mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-14 12:14:42 +01:00
Add bookmarks
This commit is contained in:
@@ -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,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user