controlador para mostrar cupo en eventos

This commit is contained in:
2023-03-10 09:10:57 -06:00
parent 69fb4d1b3f
commit ca3e4c42bd
3 changed files with 22 additions and 1 deletions
+8
View File
@@ -1,4 +1,7 @@
import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { EventoParticipante } from 'src/evento-participante/evento-participante/eventoParticipante.entity';
import { Repository } from 'typeorm';
import { actualizarEventoDto } from './dto/actualizarEvento.dto';
import { crearEventoDto } from './dto/crearEvento.dto';
import { Evento } from './evento.entity';
@@ -33,4 +36,9 @@ export class EventosController {
deleteEvento(@Param('id', ParseIntPipe)id: number){
return this.eventoService.deleteEventoParticipante(id)
}
@Get(':id/participantes')
async getCupos(@Param('id', ParseIntPipe)id: number){
return this.eventoService.getCupos(id)
}
}