import { FastifyPluginAsync } from 'fastify';
import { DummyGradesController } from '../http/controllers/DummyGradesController';
import { DummyGradesService } from '../services/DummyGradesService';
import { CanvasClient } from '../CanvasClient';

const dummyGradesRoutes: FastifyPluginAsync = async (app) => {
    const canvasClient = new CanvasClient();
    const dummyGradesService = new DummyGradesService(canvasClient);
    const dummyGradesController = new DummyGradesController(dummyGradesService);

    // Get all dummy grades
    app.get('/', dummyGradesController.getAllDummyGrades.bind(dummyGradesController));

    // Add a new dummy grade
    app.post('/add', dummyGradesController.addDummyGrade.bind(dummyGradesController));

    // Update a dummy grade
    app.put('/update', dummyGradesController.updateDummyGrade.bind(dummyGradesController));

    // Delete a dummy grade
    app.delete('/delete', dummyGradesController.deleteDummyGrade.bind(dummyGradesController));
};

export default dummyGradesRoutes; 