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

router.use(authenticate as any);

router.get('/request/:applicationId', loaController.getRequest);
router.post('/request', loaController.createRequest);
router.post('/request/:requestId/approve', loaController.approveRequest);
router.get('/request/:applicationId/approval-status', loaController.getApprovalStatus);
router.post('/request/:requestId/generate', loaController.generateDocument);
router.post('/security-deposit', loaController.updateSecurityDeposit);
router.get('/security-deposit/:applicationId', loaController.getSecurityDeposit);

export default router;
