even more stupid

This commit is contained in:
Djeeberjr 2021-09-24 17:57:01 +02:00
parent a060ed0fe4
commit 87dc249371

View File

@ -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
}