chore: custom handler type signature adjustment

This commit is contained in:
Jarrod Flesch
2024-02-26 09:41:19 -05:00
parent bf11eacf5a
commit a6cf73b6d1
19 changed files with 41 additions and 67 deletions

View File

@@ -38,7 +38,7 @@ export default buildConfigWithDefaults({
{
path: '/greet',
method: 'get',
handler: ({ req }) => {
handler: (req) => {
const sp = new URL(req.url).searchParams
return Response.json({ message: `Hi ${sp.get('name')}!` })
},
@@ -60,7 +60,7 @@ export default buildConfigWithDefaults({
path: '/config',
method: 'get',
root: true,
handler: ({ req }) => {
handler: (req) => {
return Response.json(req.payload.config)
},
custom: { description: 'Get the sanitized payload config' },