From 3baba059ab58eed7a1bccc1279811fbbf661be83 Mon Sep 17 00:00:00 2001 From: amal Date: Mon, 15 Dec 2025 12:17:59 +0800 Subject: [PATCH] upd: api update --- src/server/routes/pelayanan_surat_route.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/server/routes/pelayanan_surat_route.ts b/src/server/routes/pelayanan_surat_route.ts index 1e83c7a..b549809 100644 --- a/src/server/routes/pelayanan_surat_route.ts +++ b/src/server/routes/pelayanan_surat_route.ts @@ -791,6 +791,7 @@ const PelayananRoute = new Elysia({ jenis: item.jenis, } }) + console.log(hasil, item) if (hasil && hasil.id) { const upd = await prisma.syaratDokumenPelayanan.upsert({ @@ -808,16 +809,8 @@ const PelayananRoute = new Elysia({ } }) } else { - const newData = await prisma.syaratDokumenPelayanan.create({ - data: { - value: item.value, - jenis: item.jenis, - idPengajuanLayanan: pengajuan.id, - idCategory: pengajuan.idCategory, - } - }) + return { success: false, message: 'dokumen tidak dapat diupload' } } - } }