diff --git a/src/utils/functions/statusPopsApi.ts b/src/utils/functions/statusPopsApi.ts index 6e9891e..dae6f1a 100644 --- a/src/utils/functions/statusPopsApi.ts +++ b/src/utils/functions/statusPopsApi.ts @@ -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) => { 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 return result } catch {