Merge pull request #133 from bipproduction/lukman/20-agustus-2024

style : update position project
This commit is contained in:
Amalia
2024-08-20 17:38:20 +08:00
committed by GitHub
9 changed files with 349 additions and 22 deletions

View File

@@ -0,0 +1,28 @@
import { funGetUserByCookies } from "@/module/auth";
import { NextResponse } from "next/server";
export async function GET(request: Request) {
try {
const user = await funGetUserByCookies()
if (user.id == undefined) {
return NextResponse.json({ success: false, message: "Anda harus login untuk mengakses ini" }, { status: 401 });
}
const { searchParams } = new URL(request.url);
const id = searchParams.get("id");
return NextResponse.json({ success: true, data: null }, { status: 200 });
} catch (error) {
return NextResponse.json({ success: false, message: "" }, { status: 401 });
}
}