UNPKG

@fastify/autoload

Version:
8 lines (6 loc) 252 B
'use strict' module.exports = async function (app, opts) { app.get('/', async function (req, reply) { reply.status(200).send({ user: { id: req.params.id || 'null', username: 'example' } }) // explicit null reply to preserve response body }) }