This commit is contained in:
@@ -184,7 +184,7 @@ func (app *application) handleAPIError(w http.ResponseWriter, r *http.Request, e
|
||||
if errors.As(err, &apiError) {
|
||||
switch apiError.StatusCode {
|
||||
case http.StatusUnauthorized:
|
||||
http.Redirect(w, r, webPath("login"), http.StatusSeeOther)
|
||||
http.Redirect(w, r, loginPathForRequest(r), http.StatusSeeOther)
|
||||
return
|
||||
case http.StatusForbidden:
|
||||
if user, ok := userFromContext(r.Context()); ok && !user.Activated {
|
||||
|
||||
Reference in New Issue
Block a user