Files
api-AT/src/mesa/mesa.controller.ts
T
2026-01-13 19:12:45 -06:00

27 lines
644 B
TypeScript

import { Controller, Body, Patch, Param, Delete, Get } from '@nestjs/common';
import { MesaService } from './mesa.service';
import { UpdateMesaDto } from './dto/update-mesa.dto';
@Controller('mesa')
export class MesaController {
constructor(private readonly mesaService: MesaService) {}
@Get('all')
async findAll() {
return this.mesaService.findAll();
}
@Get('activo')
async findAllActivo() {
return this.mesaService.findAllActivo();
}
@Patch(':id')
async updateActivo(
@Param('id') id: number,
@Body() updateMesaDto: UpdateMesaDto,
) {
return this.mesaService.updateActivo(id, updateMesaDto);
}
}