fix: move error conditional outside if

This commit is contained in:
Derrick Hammer 2024-03-20 14:30:03 -04:00
parent 053a55c1f3
commit cfce7348d4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -168,10 +168,10 @@ func AuthMiddleware(options AuthMiddlewareOptions) func(http.Handler) http.Handl
}
}
}
if unauthorized {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
if unauthorized {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
return
}