upd: api jenna ai

This commit is contained in:
2025-12-08 16:28:37 +08:00
parent f928fc504f
commit fc530399dd
2 changed files with 1 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
export function isValidPhone(number: string): boolean {
const clean = number.replace(/[\s.-]/g, ""); // hapus spasi, titik, strip
const regex = /^(?:\+628|08)(\d{7,12})$/;
const regex = /^(?:\+62|62|0)8\d{7,12}$/;
return regex.test(clean);
}

View File

@@ -111,7 +111,6 @@ const PengaduanRoute = new Elysia({
const { judulPengaduan, detailPengaduan, lokasi, namaGambar, kategoriId } = body
const namaWarga = headers['x-user'] || ""
const noTelepon = headers['x-phone'] || ""
console.log(headers)
let imageFix = namaGambar
const noPengaduan = await generateNoPengaduan()
let idCategoryFix = kategoriId