Spaces:
Sleeping
Sleeping
File size: 1,235 Bytes
8b7e5fc c3990d3 f97bd0c 8b7e5fc f97bd0c 8b7e5fc c3990d3 8b7e5fc c3990d3 8b7e5fc c3990d3 8b7e5fc c3990d3 8b7e5fc c3990d3 f97bd0c 8b7e5fc |
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 47 48 49 50 51 52 53 54 |
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';
@Public()
@Controller('branchs')
export class BranchController {
constructor(private readonly branchService: BranchService) {}
@Post()
create(@Body() createBranchDto: CreateBranchDto) {
return this.branchService.create(createBranchDto);
}
@Get()
async findAll() {
return this.branchService.findAll();
}
@Get(':id')
async findOne(@Param('id') id: string) {
return this.branchService.findOne(id);
}
@Patch(':id')
async update(
@Param('id') id: string,
@Body() updateBranchDto: UpdateBranchDto,
) {
return this.branchService.update(id, updateBranchDto);
}
@Delete(':id')
async remove(@Param('id') id: string) {
return this.branchService.remove(id);
}
@Post(':id/menu-items')
async addMenuItemToBranch(@Param('id') id: string) {}
@Get(':id/menu-items')
async getMenuItemWithBranchId(@Param('id') id: string) {}
}
|