Skip to content

Commit

Permalink
Merge pull request #1588 from stakwork/feat/response_for_ssuperadmin
Browse files Browse the repository at this point in the history
Added response for auth
  • Loading branch information
elraphty authored Mar 5, 2024
2 parents bedff15 + fb7240f commit 4a47086
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 4a47086

Please sign in to comment.