se modifico la base de datos y se agrego los excel

This commit is contained in:
2023-03-17 13:38:37 -06:00
parent 0158b6af98
commit 569dbca11f
29 changed files with 1501 additions and 1245 deletions
+9 -1
View File
@@ -1,4 +1,5 @@
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post } from '@nestjs/common';
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post, Res } from '@nestjs/common';
import { Response } from 'express';
import { InjectRepository } from '@nestjs/typeorm';
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
import { Repository } from 'typeorm';
@@ -46,4 +47,11 @@ export class EventosController {
async getParticipnates(@Param('id', ParseIntPipe)id:number){
return this.eventoService.getParticipantes(id)
}
@Get(':id/exportExcel')
async exportarExcel (@Param('id', ParseIntPipe)id:number ,@Res() res: Response){
const filePath = await this.eventoService.exportarParticipantes(id);
res.download(filePath);
}
}