fix loading ofr login form and redirects.
This commit is contained in:
@@ -67,7 +67,7 @@ func AddTicket(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
userID, ok := securityHelpers.GetCurrentUserID(r)
|
||||
if !ok {
|
||||
http.Redirect(w, r, "/login", http.StatusSeeOther)
|
||||
http.Redirect(w, r, "/account/login", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ func SubmitTicket(db *sql.DB) http.HandlerFunc {
|
||||
|
||||
userID, ok := securityHelpers.GetCurrentUserID(r)
|
||||
if !ok {
|
||||
http.Redirect(w, r, "/login", http.StatusSeeOther)
|
||||
http.Redirect(w, r, "/account/login", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ func GetMyTickets(db *sql.DB) http.HandlerFunc {
|
||||
return httpHelpers.AuthMiddleware(func(w http.ResponseWriter, r *http.Request) {
|
||||
userID, ok := securityHelpers.GetCurrentUserID(r)
|
||||
if !ok {
|
||||
http.Redirect(w, r, "/login", http.StatusSeeOther)
|
||||
http.Redirect(w, r, "/account/login", http.StatusSeeOther)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user