fix: logout should set address to / and open /

This commit is contained in:
efim
2023-10-09 05:42:50 +00:00
parent a367ed9a34
commit ec47c9d610
3 changed files with 10 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ func getLogoutRoute(app *pocketbase.PocketBase) func(*core.ServeEvent) error {
HttpOnly: true,
})
c.Response().Header().Add("HX-Trigger", "auth-change-event")
return c.JSON(http.StatusOK, map[string]string{"message": "session cookie removed"})
return c.NoContent(http.StatusOK)
})
return nil
}