fix build errors
This commit is contained in:
@@ -6,10 +6,7 @@ export async function POST(req: NextRequest) {
|
||||
const { password } = await req.json();
|
||||
|
||||
if (password !== process.env.PASSWORD) {
|
||||
return NextResponse.json(
|
||||
{ error: "Invalid password" },
|
||||
{ status: 401 }
|
||||
);
|
||||
return NextResponse.json({ error: "Invalid password" }, { status: 401 });
|
||||
}
|
||||
|
||||
const session = await getSession();
|
||||
@@ -18,6 +15,7 @@ export async function POST(req: NextRequest) {
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return NextResponse.json(
|
||||
{ error: "Authentication failed" },
|
||||
{ status: 500 }
|
||||
|
Reference in New Issue
Block a user