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);
    fastify.get('/list/filter', controller.getListByFilter);
}

export default listRoutes;