se agregó endpoint de ejemplo
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user