mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
11 lines
251 B
TypeScript
11 lines
251 B
TypeScript
import type { CategoryType } from '@prisma/client'
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const { type } = getQuery<{ type: CategoryType }>(event)
|
|
return await usePrisma().category.findMany({
|
|
where: {
|
|
type,
|
|
},
|
|
})
|
|
})
|