even more stupid
This commit is contained in:
parent
a060ed0fe4
commit
87dc249371
@ -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) {
|
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)
|
rw.WriteHeader(http.StatusUnauthorized)
|
||||||
return
|
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) {
|
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)
|
rw.WriteHeader(http.StatusUnauthorized)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user