upd: api update #81

Merged
amaliadwiy merged 1 commits from amalia/15-des-25 into main 2025-12-15 12:18:48 +08:00

View File

@@ -791,6 +791,7 @@ const PelayananRoute = new Elysia({
jenis: item.jenis, jenis: item.jenis,
} }
}) })
console.log(hasil, item)
if (hasil && hasil.id) { if (hasil && hasil.id) {
const upd = await prisma.syaratDokumenPelayanan.upsert({ const upd = await prisma.syaratDokumenPelayanan.upsert({
@@ -808,16 +809,8 @@ const PelayananRoute = new Elysia({
} }
}) })
} else { } else {
const newData = await prisma.syaratDokumenPelayanan.create({ return { success: false, message: 'dokumen tidak dapat diupload' }
data: {
value: item.value,
jenis: item.jenis,
idPengajuanLayanan: pengajuan.id,
idCategory: pengajuan.idCategory,
} }
})
}
} }
} }