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'; @Controller('branch') export class BranchController { constructor(private readonly branchService: BranchService) {} @Post() create(@Body() createBranchDto: BranchDto) { return this.branchService.create(createBranchDto); } @Get() findAll() { return this.branchService.findAll(); } @Get(':id') findOne(@Param('id') id: string) { return this.branchService.findOne(+id); } @Patch(':id') update(@Param('id') id: string, @Body() updateBranchDto: BranchDto) { return this.branchService.update(+id, updateBranchDto); } @Delete(':id') remove(@Param('id') id: string) { return this.branchService.remove(+id); } }