CallingDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/shadownrx/apisquare/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/admin/logout invalidates the current admin session. The admin_session cookie is deleted and the session token is removed from Vercel KV. The response is an HTTP 302 redirect to /login. No request body is needed — the server reads the session token directly from the inbound cookie.
Request
admin_session session cookie must be present in the request; if it is absent the server still redirects without error.
Response
HTTP 302 — Redirect to/login
The Location header is set to /login. The admin_session cookie is deleted via a Set-Cookie header that clears the value and sets Max-Age=0. The legacy admin_authenticated cookie (used by older versions of the app) is also cleared for backwards compatibility.
What happens on logout
The following steps are executed in order:- Reads the
admin_sessioncookie value (the 64-character hex session token). - Deletes the
session:{token}key from Vercel KV, invalidating the token for any other serverless instance. - Removes the token from the in-memory session store (
globalSessionsSet) used as a local development fallback. - Deletes the
admin_sessioncookie. - Deletes the legacy
admin_authenticatedcookie for backwards compatibility. - Returns an HTTP 302 redirect to
/login.
After logout, all admin API endpoints (
/api/admin/reservations, /api/admin/config, etc.) will return HTTP 401 { "error": "No autorizado" } until a new session is established via POST /api/admin/login.