New Backend changes
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user