fixed little tings
This commit is contained in:
@@ -11,6 +11,11 @@ export class MesaController {
|
||||
return this.mesaService.findAll();
|
||||
}
|
||||
|
||||
@Get('activo')
|
||||
async findAllActivo() {
|
||||
return this.mesaService.findAllActivo();
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
async updateActivo(
|
||||
@Param('id') id: number,
|
||||
|
||||
@@ -15,6 +15,10 @@ export class MesaService {
|
||||
return await this.mesaRepository.find();
|
||||
}
|
||||
|
||||
async findAllActivo(): Promise<Mesa[]> {
|
||||
return await this.mesaRepository.find({where:{activo:true}});
|
||||
}
|
||||
|
||||
async updateActivo(id: number, updateMesaDto: UpdateMesaDto) {
|
||||
const mesa = await this.mesaRepository.findOne({ where: { idMesa: id } });
|
||||
if (!mesa) {
|
||||
|
||||
Reference in New Issue
Block a user