se modifico la base de datos y se agrego los excel
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user