diff --git a/internal/auth.go b/internal/auth.go index 8fefeb1..49b53fc 100644 --- a/internal/auth.go +++ b/internal/auth.go @@ -173,11 +173,13 @@ func login(s *AuthServer) http.HandlerFunc { s.logger.Error(status.Message()) // + w.WriteHeader(http.StatusUnauthorized) w.Write([]byte(status.Message())) return } + w.WriteHeader(http.StatusOK) w.Write([]byte(fmt.Sprintf("Success login for %s", uid))) } } @@ -195,6 +197,7 @@ func registration(s *AuthServer) http.HandlerFunc { s.logger.Error(status.Message()) // + w.WriteHeader(http.StatusUnauthorized) w.Write([]byte(status.Message())) return @@ -204,6 +207,7 @@ func registration(s *AuthServer) http.HandlerFunc { s.prometheus.IncUsersRegistered() // + w.WriteHeader(http.StatusOK) w.Write([]byte(fmt.Sprintf("Success registration for %s", uid))) } } @@ -219,6 +223,7 @@ func confirmation(s *AuthServer) http.HandlerFunc { s.logger.Error(status.Message()) // + w.WriteHeader(http.StatusUnauthorized) w.Write([]byte(status.Message())) return @@ -228,6 +233,7 @@ func confirmation(s *AuthServer) http.HandlerFunc { s.prometheus.IncUsersConfirmed() // + w.WriteHeader(http.StatusOK) w.Write([]byte(fmt.Sprintf("Success confirmation for %s", code))) } }