Files
portfolio/app/api/auth/logout/route.ts
denshooter 45ab058643 fix: resolve linting errors
- Remove unused parameters in logout route
- Remove unused AnimatePresence import
- Remove unused handleLogout function
2025-10-19 21:48:43 +02:00

26 lines
722 B
TypeScript

import { NextRequest, 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' } }
);
}
}