fix prisma import

This commit is contained in:
2025-02-21 16:13:13 +08:00
parent bb5ca3a0ea
commit d68a39066a
35 changed files with 66 additions and 64 deletions

View File

@@ -1,5 +1,6 @@
import backendLogger from "@/util/backendLogger";
import { NextResponse } from "next/server";
import { prisma } from "@/lib";
export async function GET(
request: Request,
@@ -7,6 +8,7 @@ export async function GET(
) {
try {
const { id } = params;
const data = await prisma.user.findUnique({
where: {
id: id,
@@ -25,7 +27,7 @@ export async function GET(
return NextResponse.json(
{
success: false,
message: "Gagal mendapatkan data, coba lagi nanti ",
message: "Error get data from API ",
reason: (error as Error).message,
},
{ status: 500 }