35 lines
782 B
TypeScript
35 lines
782 B
TypeScript
import {
|
|
Controller,
|
|
Get,
|
|
Post,
|
|
Body,
|
|
Param,
|
|
} from '@nestjs/common';
|
|
import { BitacoraService } from './bitacora.service';
|
|
import { CreateBitacoraDto } from './dto/create-bitacora.dto';
|
|
|
|
@Controller('bitacora')
|
|
export class BitacoraController {
|
|
constructor(private readonly bitacoraService: BitacoraService) {}
|
|
|
|
@Post()
|
|
create(@Body() createBitacoraDto: CreateBitacoraDto) {
|
|
return this.bitacoraService.create(createBitacoraDto);
|
|
}
|
|
|
|
@Get()
|
|
findAll() {
|
|
return this.bitacoraService.findAll();
|
|
}
|
|
|
|
@Get('/cuenta/:id')
|
|
findOneByAcount(@Param('id') id: string) {
|
|
return this.bitacoraService.findOneByAcount(+id);
|
|
}
|
|
|
|
@Get('/equipo/:id')
|
|
findOneByMachine(@Param('id') id: string) {
|
|
return this.bitacoraService.findOneByMachine(+id);
|
|
}
|
|
}
|