fix
Desc: - Perubahan minor
This commit is contained in:
25
src/app/api/portofolio/create/route.ts
Normal file
25
src/app/api/portofolio/create/route.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
if (req.method === "POST") {
|
||||
const body = await req.json();
|
||||
// myConsole(body);
|
||||
|
||||
const data = await prisma.katalog.create({
|
||||
data: {
|
||||
profileId: body.profileId,
|
||||
namaBisnis: body.namaBisnis,
|
||||
alamatKantor: body.alamatKantor,
|
||||
tlpn: body.tlpn,
|
||||
deskripssi: body.deskripssi,
|
||||
masterBidangBisnisId: body.masterBidangBisnisId,
|
||||
},
|
||||
});
|
||||
console.log(data)
|
||||
|
||||
return NextResponse.json({ status: 201, success: true });
|
||||
}
|
||||
return NextResponse.json({ success: false });
|
||||
}
|
||||
Reference in New Issue
Block a user