Add bookmarks

This commit is contained in:
2023-12-12 16:41:10 +01:00
parent c5d8816658
commit 4418e6d865
6 changed files with 269 additions and 7 deletions

View File

@@ -1,3 +1,10 @@
export default defineEventHandler(async () => {
return await usePrisma().category.findMany()
import type { CategoryType } from '@prisma/client'
export default defineEventHandler(async (event) => {
const { type } = getQuery<{ type: CategoryType }>(event)
return await usePrisma().category.findMany({
where: {
type,
},
})
})