|
|
|
|
@ -6,9 +6,6 @@ import { z } from 'zod'
|
|
|
|
|
export const POST = async ({ locals, request }) => {
|
|
|
|
|
const body = await request.json()
|
|
|
|
|
|
|
|
|
|
console.log(body)
|
|
|
|
|
return json({})
|
|
|
|
|
|
|
|
|
|
const form = z
|
|
|
|
|
.object({
|
|
|
|
|
key: z.string(),
|
|
|
|
|
@ -21,7 +18,10 @@ export const POST = async ({ locals, request }) => {
|
|
|
|
|
})
|
|
|
|
|
.safeParse(body)
|
|
|
|
|
|
|
|
|
|
if (!form.success) return json({}, { status: 400 })
|
|
|
|
|
if (!form.success) {
|
|
|
|
|
console.log(form.error)
|
|
|
|
|
return json({}, { status: 400 })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const apiKey = 'wrc1w54Zp5JAfXLxY2'
|
|
|
|
|
// const apiSecret = 'tY7oYPhwSE1gabFS4PmxtmbDOhkYWvPh0khf'
|
|
|
|
|
|