Changed api link

This commit is contained in:
Patrick Alvin Alcala 2025-11-21 18:58:13 +08:00
parent f9de6fb7b4
commit f6d3e05081

View file

@ -8,7 +8,7 @@ export default async (api: string, value?: any) => {
if (!value) { if (!value) {
fetch = await ofetch(API + api, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] }) fetch = await ofetch(API + api, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] })
} else { } else {
fetch = await ofetch(API + `${api}/${value}/fetch-data`, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] }) fetch = await ofetch(`${API}${api}/${value}/fetch-data`, { parseResponse: JSON.parse, retry: 3, retryDelay: 500, retryStatusCodes: [400, 404, 405, 500, 502] })
} }
return fetch return fetch