16 lines
306 B
Go
16 lines
306 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"logjensticks/internal/auth"
|
|
)
|
|
|
|
func handleMe(w http.ResponseWriter, r *http.Request) {
|
|
session := auth.SessionFromContext(r.Context())
|
|
writeSuccess(w, http.StatusOK, map[string]string{
|
|
"username": session.Username,
|
|
"role": session.Role,
|
|
})
|
|
}
|