11 lines
415 B
TypeScript
11 lines
415 B
TypeScript
import { FastifyInstance } from 'fastify';
|
|
import * as controller from './list.controller';
|
|
|
|
async function listRoutes(fastify: FastifyInstance) {
|
|
fastify.get('/list', controller.getList);
|
|
fastify.get('/list/entry/:entryId', controller.getSingleEntry);
|
|
fastify.post('/list/entry', controller.upsertEntry);
|
|
fastify.delete('/list/entry/:entryId', controller.deleteEntry);
|
|
}
|
|
|
|
export default listRoutes; |