fix: move error conditional outside if
This commit is contained in:
parent
053a55c1f3
commit
cfce7348d4
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue