Merge pull request 'upd: api jenna ai' (#63) from amalia/08-des-25 into main
Reviewed-on: http://wibugit.wibudev.com/wibu/jenna-mcp/pulls/63
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
export function isValidPhone(number: string): boolean {
|
export function isValidPhone(number: string): boolean {
|
||||||
const clean = number.replace(/[\s.-]/g, ""); // hapus spasi, titik, strip
|
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);
|
return regex.test(clean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,6 @@ const PengaduanRoute = new Elysia({
|
|||||||
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'] || ""
|
||||||
console.log(headers)
|
|
||||||
let imageFix = namaGambar
|
let imageFix = namaGambar
|
||||||
const noPengaduan = await generateNoPengaduan()
|
const noPengaduan = await generateNoPengaduan()
|
||||||
let idCategoryFix = kategoriId
|
let idCategoryFix = kategoriId
|
||||||
|
|||||||
Reference in New Issue
Block a user