import { Router, type IRouter } from 'express';
import * as fielController from '../controllers/fiel.controller.js';
import { authenticate } from '../middlewares/auth.middleware.js';
import { tenantMiddleware } from '../middlewares/tenant.middleware.js';

const router: IRouter = Router();

router.use(authenticate);
router.use(tenantMiddleware);

// POST /api/fiel/upload - Subir credenciales FIEL
router.post('/upload', fielController.upload);

// GET /api/fiel/status - Obtener estado de la FIEL
router.get('/status', fielController.status);

// DELETE /api/fiel - Eliminar credenciales FIEL
router.delete('/', fielController.remove);

export default router;
