fixed little tings

This commit is contained in:
2026-01-13 19:12:45 -06:00
parent 20f6e89e82
commit 3b25606056
9 changed files with 38 additions and 17 deletions
+5
View File
@@ -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,
+4
View File
@@ -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) {