This commit is contained in:
2024-08-22 18:20:29 +02:00
parent ee14d523cf
commit fb8d9b450e
36 changed files with 261 additions and 180 deletions

View File

@@ -0,0 +1,10 @@
import { useValidatedBody, z } from 'h3-zod'
export default defineEventHandler(async (event) => {
const users = await useDB().select().from(tables.users).all()
const { email } = await useValidatedBody(event, {
email: z.string(),
})
const user = users.find(user => user.email === email)
return !!user
})

View File

@@ -1,3 +0,0 @@
export default defineEventHandler(() => {
return { hello: 'API' }
})