adds user accounts, service requests, dashboard, admin panel, better layout, db+altcha+auth support
This commit is contained in:
parent
dfbc3cade9
commit
0043a5bf3c
40 changed files with 3981 additions and 188 deletions
23
app/api/logout/route.ts
Normal file
23
app/api/logout/route.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { auth } from "@/util/auth";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
try {
|
||||
await auth.api.signOut({
|
||||
headers: request.headers,
|
||||
});
|
||||
|
||||
return NextResponse.json({
|
||||
success: true,
|
||||
message: "Signed out successfully",
|
||||
});
|
||||
|
||||
} catch (error: unknown) {
|
||||
console.error("Logout error:", error);
|
||||
|
||||
return NextResponse.json(
|
||||
{ error: "Internal server error" },
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue