Spaces:
Sleeping
Sleeping
import { | |
Controller, | |
Get, | |
Post, | |
Body, | |
Patch, | |
Param, | |
Delete, | |
} from '@nestjs/common'; | |
import { BranchService } from './branch.service.js'; | |
import { BranchDto } from './dto/create-branch.dto.js'; | |
'branch') | (|
export class BranchController { | |
constructor(private readonly branchService: BranchService) {} | |
() | |
create() { () createBranchDto: BranchDto | |
return this.branchService.create(createBranchDto); | |
} | |
() | |
findAll() { | |
return this.branchService.findAll(); | |
} | |
':id') | (|
findOne('id') id: string) { ( | |
return this.branchService.findOne(+id); | |
} | |
':id') | (|
update('id') id: string, () updateBranchDto: BranchDto) { ( | |
return this.branchService.update(+id, updateBranchDto); | |
} | |
':id') | (|
remove('id') id: string) { ( | |
return this.branchService.remove(+id); | |
} | |
} | |