37 lines
860 B
TypeScript
37 lines
860 B
TypeScript
import {
|
|
Controller,
|
|
Get,
|
|
Post,
|
|
Body,
|
|
Patch,
|
|
Param,
|
|
Delete,
|
|
} from '@nestjs/common';
|
|
import { BitacoraMesaService } from './bitacora_mesa.service';
|
|
import { CreateBitacoraMesaDto } from './dto/create-bitacora_mesa.dto';
|
|
|
|
@Controller('bitacora-mesa')
|
|
export class BitacoraMesaController {
|
|
constructor(private readonly bitacoraMesaService: BitacoraMesaService) {}
|
|
|
|
@Post()
|
|
create(@Body() createBitacoraMesaDto: CreateBitacoraMesaDto) {
|
|
return this.bitacoraMesaService.create(createBitacoraMesaDto);
|
|
}
|
|
|
|
@Get()
|
|
findAll() {
|
|
return this.bitacoraMesaService.findAll();
|
|
}
|
|
|
|
@Get(':id')
|
|
findOne(@Param('id') id: string) {
|
|
return this.bitacoraMesaService.findOne(+id);
|
|
}
|
|
|
|
@Get('/cuenta/:id_cuenta')
|
|
findByCuenta(@Param('id_cuenta') id_cuenta: string) {
|
|
return this.bitacoraMesaService.findByCuenta(+id_cuenta);
|
|
}
|
|
}
|