Skip to content

Commit

Permalink
fix(backend): fix request redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Urban committed Apr 11, 2024
1 parent 10ea658 commit 02e0eae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/internal/handlers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (h *Handler) HandleAuthenticate(w http.ResponseWriter, r *http.Request) {
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
// Return 401 if the user is not authorized for the requested siteURL
http.Redirect(w, r, "/request", http.StatusSeeOther)
http.Redirect(w, r, "/request?redirect="+siteURL, http.StatusSeeOther)
return
}
h.logError(w, "Database error while checking user authorization", err, http.StatusInternalServerError)
Expand Down

0 comments on commit 02e0eae

Please sign in to comment.