mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-01-28 10:20:27 +01:00
working
This commit is contained in:
@@ -4,7 +4,7 @@ export async function useCategories() {
|
||||
const { data: categories, refresh }
|
||||
= await useAsyncData<CategoryType[]>(async () => await useRequestFetch()('/api/categories'))
|
||||
|
||||
async function getCategory(id: number) {
|
||||
async function getCategory(id: number): CategoryType {
|
||||
return categories.data.value.find(category => category.id === id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user