Revised statusPops

This commit is contained in:
Patrick Alvin Alcala 2026-03-07 11:30:03 +08:00
parent 4ad779bdfa
commit 7f60d5a347

View file

@ -1,10 +1,15 @@
import { ofetch } from 'ofetch'; import { ofetch } from 'ofetch'
const STATUS = "https://gateway.davaocity.gov.ph/api/pops/statusOP.ashx?oprefid=" // const STATUS = 'https://gateway.davaocity.gov.ph/api/pops/statusOP.ashx?oprefid='
const API = import.meta.env.VITE_BACKEND
export default async (application: string) => { export default async (application: string) => {
try { try {
const fetch = await ofetch(STATUS + application, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] }) // const fetch = await ofetch(STATUS + application, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] })
// const result = fetch
// return result
const fetch = await ofetch(API + `pops/statusOP/${application}/check-status-pops`, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] })
const result = fetch const result = fetch
return result return result
} catch { } catch {