add-endpoint
Installation
SKILL.md
Add API Endpoint
Create endpoint for $ARGUMENTS.
Steps
-
Read the pattern: Open
packages/server/api/src/app/tables/table/table.controller.tsas reference. -
Create or update controller using
FastifyPluginAsyncZod:export const myController: FastifyPluginAsyncZod = async (fastify) => { fastify.post('/', CreateRequest, async (request) => { return myService(request.log).create({ projectId: request.projectId, request: request.body, }) }) }