se agregó endpoint de ejemplo

This commit is contained in:
2025-11-05 11:09:19 -06:00
parent ef710d8461
commit a59922213d
3 changed files with 14 additions and 1 deletions
Binary file not shown.
Binary file not shown.
+14 -1
View File
@@ -110,7 +110,8 @@ export class EquipoController {
return this.equipoService.findAllProcesadorforTipoEquipos(idEquipo);
}
@Get('reporte')
@UseGuards(AuthGuard('jwt'))
@Get('reporteXLSX')
async generarReporte(@Res() res: Response) {
try {
await this.equipoService.createEcxel(res);
@@ -120,6 +121,18 @@ export class EquipoController {
}
}
@UseGuards(AuthGuard('jwt'))
@Get('reporte')
async reporte(@Res() res: Response) {
try {
await this.equipoService.generar_reporte();
} catch (error) {
console.error('Error al generar el Excel:', error);
res.status(500).send('Error al generar el archivo Excel');
}
}
@UseGuards(AuthGuard('jwt'))
@Post('example')
async generate() {
this.equipoService.example();