Skip to content

Commit

Permalink
added response for auth
Browse files Browse the repository at this point in the history
  • Loading branch information
elraphty committed Mar 5, 2024
1 parent bedff15 commit fb7240f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func (ah *authHandler) GetIsAdmin(w http.ResponseWriter, r *http.Request) {
isAdmin := auth.AdminCheck(pubKeyFromAuth)

if !auth.IsFreePass() && !isAdmin {
fmt.Println("Not a super admin: handler")
http.Error(w, http.StatusText(401), 401)
w.WriteHeader(http.StatusUnauthorized)
json.NewEncoder(w).Encode("Not a super admin: handler")
return
} else {
w.WriteHeader(http.StatusOK)
Expand Down

0 comments on commit fb7240f

Please sign in to comment.