From 87dc2493717cd5c0a03d5e5d18786bf3aa2f4d95 Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Fri, 24 Sep 2021 17:57:01 +0200 Subject: [PATCH] even more stupid --- internal/httpserver/httpServer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 }