Spaces:
Runtime error
Runtime error
File size: 1,044 Bytes
97dab2a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
} from '@nestjs/common';
import { SupplierService } from './supplier.service';
import { CreateSupplierDto } from '@bpm/data/dto/supplier/create-supplier.dto';
import { UpdateSupplierDto } from '@bpm/data/dto/supplier/update-supplier.dto';
@Controller(['supplier', 'suppliers'])
export class SupplierController {
constructor(private readonly supplierService: SupplierService) {}
@Post()
create(@Body() createSupplierDto: CreateSupplierDto) {
return this.supplierService.create(createSupplierDto);
}
@Get()
findAll() {
return this.supplierService.findAll();
}
@Get(':id')
findOne(@Param('id') id: string) {
return this.supplierService.findOne(+id);
}
@Patch(':id')
update(
@Param('id') id: string,
@Body() updateSupplierDto: UpdateSupplierDto,
) {
return this.supplierService.update(+id, updateSupplierDto);
}
@Delete(':id')
remove(@Param('id') id: string) {
return this.supplierService.remove(+id);
}
}
|