mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-28 10:50:34 +01:00
Add query to fetch categories with type
This commit is contained in:
@@ -29,7 +29,7 @@ function isCategory(category: string) {
|
|||||||
|
|
||||||
const {
|
const {
|
||||||
data: getCategories,
|
data: getCategories,
|
||||||
} = await useFetch<Array<Category>>('/api/categories', { method: 'GET' })
|
} = await useFetch<Array<Category>>('/api/categories', { method: 'GET', query: { type: 'TALENT' } })
|
||||||
getCategories.value!.forEach((category: any) => categories.value.push({ label: category.name, slug: category.slug }))
|
getCategories.value!.forEach((category: any) => categories.value.push({ label: category.name, slug: category.slug }))
|
||||||
|
|
||||||
const appConfig = useAppConfig()
|
const appConfig = useAppConfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user