Fix event & auth

Deskripsi:
- Fix event kondisi user melewatkan event
- Fix bug force-dynamic di beberapa api
This commit is contained in:
2024-12-08 17:16:05 +08:00
parent 5eec7d57be
commit 231f713005
16 changed files with 121 additions and 167 deletions

View File

@@ -1,7 +1,9 @@
import { NextResponse } from "next/server";
export async function GET(req: Request) {
const auth = req.headers.get("Authorization");
const token = auth?.split(" ")[1];
if (!token)
return new Response(JSON.stringify({ success: false }), { status: 401 });
return new Response(JSON.stringify({ success: true }));
if (!token) return NextResponse.json({ success: false }, { status: 401 });
return NextResponse.json({ success: true });
}