import express from 'express';
const router = express.Router();
import * as constitutionalController from './constitutional.controller.js';
import { authenticate } from '../../common/middleware/auth.js';

// Constitutional change routes (Base at /)
router.get('/meta', authenticate as any, constitutionalController.getMeta);
router.post('/', authenticate as any, constitutionalController.submitRequest);
router.get('/checklist', authenticate as any, constitutionalController.getChecklist);
router.get('/', authenticate as any, constitutionalController.getRequests);
router.get('/:id', authenticate as any, constitutionalController.getRequestById);
router.post('/:id/action', authenticate as any, constitutionalController.takeAction);
router.post('/:id/documents', authenticate as any, constitutionalController.uploadDocuments);
router.post('/:id/documents/:documentId/verify', authenticate as any, constitutionalController.verifyDocument);
router.post('/:id/documents/:documentId/reject', authenticate as any, constitutionalController.rejectDocument);

export default router;
