ch11.6
This commit is contained in:
@@ -219,7 +219,7 @@ func (app *application) userLogoutPost(w http.ResponseWriter, r *http.Request) {
|
||||
app.serverError(w, err)
|
||||
return
|
||||
}
|
||||
app.sessionManager.Remove(r.Context(), "authenticatedUserId")
|
||||
app.sessionManager.Remove(r.Context(), "authenticatedUserID")
|
||||
app.sessionManager.Put(r.Context(), "flash", "You've been logged out succefully!")
|
||||
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
|
||||
Reference in New Issue
Block a user