add crm auth, email, status update and search
All checks were successful
Auto Deploy / deploy (push) Successful in 1m7s
All checks were successful
Auto Deploy / deploy (push) Successful in 1m7s
This commit is contained in:
18
app/api/admin/logout/route.ts
Normal file
18
app/api/admin/logout/route.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NextResponse } from "next/server";
|
||||
import { getSessionCookieName } from "@/lib/auth";
|
||||
|
||||
export async function POST() {
|
||||
const response = NextResponse.json({ success: true });
|
||||
|
||||
response.cookies.set({
|
||||
name: getSessionCookieName(),
|
||||
value: "",
|
||||
httpOnly: true,
|
||||
secure: true,
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
maxAge: 0,
|
||||
});
|
||||
|
||||
return response;
|
||||
}
|
||||
Reference in New Issue
Block a user