Added select-special

Fixed Banking Page
This commit is contained in:
2025-09-07 19:20:50 +02:00
parent 9f59b94336
commit 34c5764472
2 changed files with 33 additions and 10 deletions

View File

@@ -36,6 +36,24 @@ export const useEntities = (
return data
}
const selectSpecial = async (
select: string = "*",
sortColumn: string | null = null,
ascending: boolean = false,
) => {
const res = await useNuxtApp().$api(`/api/resource-special/${relation}`, {
method: "GET",
params: {
select,
sort: sortColumn || undefined,
asc: ascending
}
})
return res || []
}
const selectSingle = async (
idToEq: string | number,
select: string = "*",
@@ -113,7 +131,7 @@ export const useEntities = (
return res
}
return {select, create, update, archive, selectSingle}
return {select, create, update, archive, selectSingle, selectSpecial}
}