adds user accounts, service requests, dashboard, admin panel, better layout, db+altcha+auth support

This commit is contained in:
Aidan 2025-07-07 20:01:59 -04:00
parent dfbc3cade9
commit 0043a5bf3c
40 changed files with 3981 additions and 188 deletions

23
app/api/logout/route.ts Normal file
View 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 }
);
}
}