This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/api/debug.js
Cory Dransfeldt 1a6d840a4a
chore: debug
2024-04-02 11:26:18 -07:00

18 lines
No EOL
407 B
JavaScript

export default async (context, request) => {
console.log(context)
console.log(request)
const data = await request.formData()
console.log(data)
const payload = JSON.parse(data.get('payload'))
console.log(payload)
return new Response(JSON.stringify({
status: 'success',
}),
{ headers: { "Content-Type": "application/json" } }
)
}
export const config = {
path: '/api/debug',
}