diff --git a/server/src/handler/checkSetup.go b/server/src/handler/checkSetup.go index 79c7ef3..acd2180 100644 --- a/server/src/handler/checkSetup.go +++ b/server/src/handler/checkSetup.go @@ -9,17 +9,17 @@ import ( ) func (authMux *AuthMux) CheckSetup(w http.ResponseWriter, r *http.Request) { - if authMux.app.IsInitialized() { - authMux.accessDenied(w, r) + if !authMux.app.IsInitialized() { + usrSetup := UserInfoJson{ + Name: "setup", + Role: user.ROLE_SETUP, + } + + w.Header().Add("Content-Type", "application/json") + jsonString, _ := json.Marshal(usrSetup) + fmt.Fprintf(w, "%s", string(jsonString)) return } - usrSetup := UserInfoJson{ - Name: "setup", - Role: user.ROLE_SETUP, - } - - w.Header().Add("Content-Type", "application/json") - jsonString, _ := json.Marshal(usrSetup) - fmt.Fprintf(w, "%s", string(jsonString)) + authMux.accessDenied(w, r) }