- Remove unused parameters in logout route - Remove unused AnimatePresence import - Remove unused handleLogout function
26 lines
722 B
TypeScript
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' } }
|
|
);
|
|
}
|
|
}
|