fix middleware
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const auth = req.headers.get("Authorization");
|
||||
const token = auth?.split(" ")[1];
|
||||
console.log("TOKEN>", token);
|
||||
if (!token) return NextResponse.json({ success: false }, { status: 401 });
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
|
||||
Reference in New Issue
Block a user