Files
portfolio/app/api/auth/logout/route.ts
denshooter 623411b093
Some checks failed
CI/CD Pipeline (Using Gitea Variables & Secrets) / production (push) Failing after 10m24s
Test Gitea Variables and Secrets / test-variables (push) Successful in 3s
fix: remove unused NextRequest import
2025-10-19 21:48:49 +02:00

26 lines
709 B
TypeScript

import { NextResponse } from 'next/server';
export async function POST() {
try {
// Simple logout - just return success
// The client will handle clearing the session storage
return new NextResponse(
JSON.stringify({ success: true, message: 'Logged out successfully' }),
{
status: 200,
headers: {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache, no-store, must-revalidate',
'Pragma': 'no-cache',
'Expires': '0'
}
}
);
} catch {
return new NextResponse(
JSON.stringify({ error: 'Logout failed' }),
{ status: 500, headers: { 'Content-Type': 'application/json' } }
);
}
}