fix ( middleware )

deskripsi:
- fix access api melalui middleware di: home, profile dan portofolio
This commit is contained in:
2025-01-08 10:39:18 +08:00
parent 18bd4efed1
commit cccb011da5
36 changed files with 1206 additions and 450 deletions

View File

@@ -5,12 +5,7 @@ import { NextResponse } from "next/server";
export async function GET(req: Request) {
const auth = req.headers.get("Authorization");
const token = auth?.split(" ")[1];
console.log("validasi atas", token);
if (!token) return NextResponse.json({ success: false }, { status: 401 });
console.log("validasi bawah", token);
return NextResponse.json({ success: true });
}