fix version
This commit is contained in:
@@ -58,8 +58,6 @@ async function POST(request: Request) {
|
||||
try {
|
||||
const { data } = (await request.json()) as RequestBody;
|
||||
|
||||
console.log("body >>", data.bidang.name);
|
||||
|
||||
if (!data.bidang.name || !Array.isArray(data.subBidang)) {
|
||||
return NextResponse.json(
|
||||
{
|
||||
@@ -80,7 +78,6 @@ async function POST(request: Request) {
|
||||
`;
|
||||
const lastId = rows[0]?.id ?? null;
|
||||
const bidangId = lastId ? String(Number(lastId) + 1) : "1";
|
||||
console.log("bidangId >>", bidangId);
|
||||
|
||||
const slugName = data.bidang.name.toLowerCase().replace(/\s+/g, "_");
|
||||
|
||||
@@ -97,8 +94,6 @@ async function POST(request: Request) {
|
||||
where: { masterBidangBisnisId: createdBidang.id },
|
||||
});
|
||||
|
||||
console.log("existingSubCount >>", existingSubCount);
|
||||
|
||||
// 3) generate unique ids satu-per-satu (cek ke DB via tx)
|
||||
const subBidangToCreate: {
|
||||
id: string;
|
||||
|
||||
Reference in New Issue
Block a user