Spaces:
Sleeping
Sleeping
import { | |
Controller, | |
Get, | |
Post, | |
Body, | |
Patch, | |
Param, | |
Delete, | |
} from '@nestjs/common'; | |
import { BranchService } from './branch.service.js'; | |
import { CreateBranchDto } from './dto/create-branch.dto.js'; | |
import { UpdateBranchDto } from './dto/update-branch.dto.js'; | |
import { Public } from '../authentication/authentication.decorator.js'; | |
() | |
'branchs') | (|
export class BranchController { | |
constructor(private readonly branchService: BranchService) {} | |
() | |
create() { () createBranchDto: CreateBranchDto | |
return this.branchService.create(createBranchDto); | |
} | |
':id/restore') | (|
restore('id') id: string) { ( | |
return this.branchService.restore(id); | |
} | |
() | |
async findAll() { | |
return this.branchService.findAll(); | |
} | |
':id') | (|
async findOne('id') id: string) { ( | |
return this.branchService.findOne(id); | |
} | |
':id') | (|
async update( | |
'id') id: string, ( | |
() updateBranchDto: UpdateBranchDto, | |
) { | |
return this.branchService.update(id, updateBranchDto); | |
} | |
':id') | (|
async remove('id') id: string) { ( | |
return this.branchService.softRemove(id); | |
} | |
':id/menu-items') | (|
async addMenuItemToBranch('id') id: string) {} ( | |
':id/menu-items') | (|
async getMenuItemWithBranchId('id') id: string) {} ( | |
} | |