Changed name of functions

This commit is contained in:
Patrick Alvin Alcala 2025-11-04 16:53:25 +08:00
parent 31cdf2a688
commit 9ffae4ed03
2 changed files with 0 additions and 0 deletions

View file

@ -1,22 +0,0 @@
import { ofetch } from 'ofetch'
const API = import.meta.env.VITE_BACKEND
export default async (api: string) => {
try {
const fetchResponse = await ofetch(API + api)
const resultObject: Record<string, any> = {}
for (let i = 1; i <= 10; i++) {
const propertyName = `result${i}`
if (fetchResponse.hasOwnProperty(propertyName)) {
resultObject[propertyName] = fetchResponse[propertyName]
}
}
return resultObject
} catch {
return false
}
}