Merge pull request 'upd' (#60) from amalia/08-des-25 into main
Reviewed-on: http://wibugit.wibudev.com/wibu/jenna-mcp/pulls/60
This commit is contained in:
@@ -109,8 +109,8 @@ const PengaduanRoute = new Elysia({
|
|||||||
// --- PENGADUAN ---
|
// --- PENGADUAN ---
|
||||||
.post("/create", async ({ body, headers }) => {
|
.post("/create", async ({ body, headers }) => {
|
||||||
const { judulPengaduan, detailPengaduan, lokasi, namaGambar, kategoriId } = body
|
const { judulPengaduan, detailPengaduan, lokasi, namaGambar, kategoriId } = body
|
||||||
const namaWarga = headers["x-user"] || ""
|
const namaWarga = headers['x-user'] || ""
|
||||||
const noTelepon = headers["x-phone"] || ""
|
const noTelepon = headers['x-phone'] || ""
|
||||||
let imageFix = namaGambar
|
let imageFix = namaGambar
|
||||||
const noPengaduan = await generateNoPengaduan()
|
const noPengaduan = await generateNoPengaduan()
|
||||||
let idCategoryFix = kategoriId
|
let idCategoryFix = kategoriId
|
||||||
@@ -142,7 +142,7 @@ const PengaduanRoute = new Elysia({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isValidPhone(noTelepon)) {
|
if (!isValidPhone(noTelepon)) {
|
||||||
return { success: false, message: 'nomor telepon tidak valid, harap masukkan nomor yang benar' }
|
return { success: false, message: `nomor telepon ${noTelepon} tidak valid, harap masukkan nomor yang benar` }
|
||||||
}
|
}
|
||||||
|
|
||||||
const nomorHP = normalizePhoneNumber({ phone: noTelepon })
|
const nomorHP = normalizePhoneNumber({ phone: noTelepon })
|
||||||
|
|||||||
Reference in New Issue
Block a user