diff --git a/internal/httpserver/httpServer.go b/internal/httpserver/httpServer.go index e9ebfa0..5d45e1d 100644 --- a/internal/httpserver/httpServer.go +++ b/internal/httpserver/httpServer.go @@ -101,7 +101,7 @@ func InitHttp(resolveContext context.Context, schema graphql.Schema, address str } func httpGetFile(ctx context.Context, rw http.ResponseWriter, r *http.Request) { - if helper.IsAuthenticated(r.Context()) { + if !helper.IsAuthenticated(r.Context()) { rw.WriteHeader(http.StatusUnauthorized) return } @@ -145,7 +145,7 @@ func httpGetFile(ctx context.Context, rw http.ResponseWriter, r *http.Request) { } func httpPostFile(ctx context.Context, rw http.ResponseWriter, r *http.Request) { - if helper.IsAuthenticated(r.Context()) { + if !helper.IsAuthenticated(r.Context()) { rw.WriteHeader(http.StatusUnauthorized) return }