Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user