import { FastifyInstance } from 'fastify';
import {
    getTasks,
    createTask,
    updateTask,
    completeTask,
    deleteTask,
} from '../controllers/tasks.controller';

export async function taskRoutes(server: FastifyInstance) {
    server.get('/', getTasks);
    server.post('/', createTask);
    server.patch('/:id', updateTask);
    server.post('/:id/complete', completeTask);
    server.delete('/:id', deleteTask);
}
