Compare commits
1 Commits
v1.5.19
...
qc/1-dec-2
| Author | SHA1 | Date | |
|---|---|---|---|
| b951c698c5 |
@@ -114,7 +114,7 @@ async function DELETE(request: Request, context: { params: { id: string } }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (data?.logoId != null) {
|
if (data?.logoId != null) {
|
||||||
@@ -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;
|
const pinId = data?.BusinessMaps?.pinId;
|
||||||
|
|
||||||
if (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: {
|
where: {
|
||||||
portofolioId: id,
|
id: data?.BusinessMaps?.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const deleteMap = await prisma.businessMaps.delete({
|
const deletePortoMedsos = await prisma.portofolio_MediaSosial.delete({
|
||||||
where: {
|
where: {
|
||||||
portofolioId: id,
|
portofolioId: data?.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const deletePortofolio = await prisma.portofolio.delete({
|
const deletePortofolio = await prisma.portofolio.delete({
|
||||||
where: {
|
where: {
|
||||||
id: id,
|
id: data?.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error delete logo", error);
|
console.error("Error delete logo", error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ async function GET(request: Request) {
|
|||||||
if (category === "beranda") {
|
if (category === "beranda") {
|
||||||
fixData = await prisma.voting.findMany({
|
fixData = await prisma.voting.findMany({
|
||||||
orderBy: {
|
orderBy: {
|
||||||
updatedAt: "desc",
|
awalVote: "asc"
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
voting_StatusId: "1",
|
voting_StatusId: "1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "Software Developer"
|
"name": "Software Development"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
|
|||||||
Reference in New Issue
Block a user