Spaces:
Runtime error
Runtime error
| 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'; | |
| (['supplier', 'suppliers']) | |
| export class SupplierController { | |
| constructor(private readonly supplierService: SupplierService) {} | |
| () | |
| create(() createSupplierDto: CreateSupplierDto) { | |
| return this.supplierService.create(createSupplierDto); | |
| } | |
| () | |
| findAll() { | |
| return this.supplierService.findAll(); | |
| } | |
| (':id') | |
| findOne(('id') id: string) { | |
| return this.supplierService.findOne(+id); | |
| } | |
| (':id') | |
| update( | |
| ('id') id: string, | |
| () updateSupplierDto: UpdateSupplierDto, | |
| ) { | |
| return this.supplierService.update(+id, updateSupplierDto); | |
| } | |
| (':id') | |
| remove(('id') id: string) { | |
| return this.supplierService.remove(+id); | |
| } | |
| } | |