QC : Pak jun dan Inno

Fix:
modified:   src/app/api/mobile/portofolio/[id]/route.ts
modified:   src/app/api/mobile/voting/route.ts
modified:   src/bin/seeder/colab/master_industri.json

### No Issue
This commit is contained in:
2025-12-01 17:39:42 +08:00
parent ad91a48d82
commit b951c698c5
3 changed files with 9 additions and 10 deletions

View File

@@ -134,7 +134,7 @@ async function DELETE(request: Request, context: { params: { id: string } }) {
}
}
if (data?.BusinessMaps) {
if (data?.BusinessMaps !== null) {
const pinId = data?.BusinessMaps?.pinId;
if (pinId) {
@@ -172,24 +172,23 @@ async function DELETE(request: Request, context: { params: { id: string } }) {
}
}
const deletePortoMedsos = await prisma.portofolio_MediaSosial.delete({
const deleteMap = await prisma.businessMaps.delete({
where: {
portofolioId: id,
id: data?.BusinessMaps?.id,
},
});
const deleteMap = await prisma.businessMaps.delete({
const deletePortoMedsos = await prisma.portofolio_MediaSosial.delete({
where: {
portofolioId: id,
portofolioId: data?.id,
},
});
const deletePortofolio = await prisma.portofolio.delete({
where: {
id: id,
id: data?.id,
},
});
} catch (error) {
console.error("Error delete logo", error);
}

View File

@@ -72,7 +72,7 @@ async function GET(request: Request) {
if (category === "beranda") {
fixData = await prisma.voting.findMany({
orderBy: {
updatedAt: "desc",
awalVote: "asc"
},
where: {
voting_StatusId: "1",

View File

@@ -1,7 +1,7 @@
[
{
"id": 1,
"name": "Software Developer"
"name": "Software Development"
},
{
"id": 2,