Add missing return

This commit is contained in:
Pavel Korotkov 2020-07-24 17:05:33 +03:00
parent f6aeb06ee9
commit c939abaf5e

View file

@ -15,6 +15,7 @@ func AttachUserAuth(router *mux.Router, center *auth.Center, log *zap.Logger) {
if err != nil { if err != nil {
log.Error("failed to pass authentication", zap.Error(err)) log.Error("failed to pass authentication", zap.Error(err))
WriteErrorResponse(r.Context(), w, getAPIError(ErrAccessDenied), r.URL) WriteErrorResponse(r.Context(), w, getAPIError(ErrAccessDenied), r.URL)
return
} }
h.ServeHTTP(w, r.WithContext(auth.SetBearerToken(r.Context(), bearerToken))) h.ServeHTTP(w, r.WithContext(auth.SetBearerToken(r.Context(), bearerToken)))