fix middle 103

This commit is contained in:
2025-04-09 11:38:12 +08:00
parent 29036beb15
commit fa69f3a929
6 changed files with 37 additions and 9 deletions

View File

@@ -1,11 +1,8 @@
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 received in API Validation:", token , `<<<<<<<<<<<<<<<`);
console.log("Authorization header:", auth, `<--------`);
const token = req.headers.get("Authorization")?.split(" ")[1];
console.log("Token received in API Validation:", token, `<<<<<<<<<<<<<<<`);
if (!token) return NextResponse.json({ success: false }, { status: 401 });