2026-01-21 15:13:21 -06:00
|
|
|
import { Controller, Body, Patch, Param, Get } from '@nestjs/common';
|
2025-09-22 18:09:41 -06:00
|
|
|
import { MesaService } from './mesa.service';
|
|
|
|
|
import { UpdateMesaDto } from './dto/update-mesa.dto';
|
|
|
|
|
|
|
|
|
|
@Controller('mesa')
|
|
|
|
|
export class MesaController {
|
|
|
|
|
constructor(private readonly mesaService: MesaService) {}
|
|
|
|
|
|
2026-01-21 15:13:21 -06:00
|
|
|
@Get()
|
2025-09-22 18:09:41 -06:00
|
|
|
async findAll() {
|
|
|
|
|
return this.mesaService.findAll();
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-13 19:12:45 -06:00
|
|
|
@Get('activo')
|
|
|
|
|
async findAllActivo() {
|
|
|
|
|
return this.mesaService.findAllActivo();
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-22 18:09:41 -06:00
|
|
|
@Patch(':id')
|
|
|
|
|
async updateActivo(
|
|
|
|
|
@Param('id') id: number,
|
|
|
|
|
@Body() updateMesaDto: UpdateMesaDto,
|
|
|
|
|
) {
|
|
|
|
|
return this.mesaService.updateActivo(id, updateMesaDto);
|
|
|
|
|
}
|
|
|
|
|
}
|