New Backend changes

This commit is contained in:
2025-09-02 19:10:59 +02:00
parent 27af6a0953
commit 8d5e158d59
4 changed files with 33 additions and 18 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}
}