Spaces:
Sleeping
Sleeping
import { | |
Controller, | |
Get, | |
Post, | |
Body, | |
Patch, | |
Param, | |
Delete, | |
} from '@nestjs/common'; | |
import { MenuItemService } from './menu-item.service.js'; | |
import { CreateMenuItemDto } from './dto/create-menu-item.dto.js'; | |
import { UpdateMenuItemDto } from './dto/update-menu-item.dto.js'; | |
import { Public } from '../authentication/authentication.decorator.js'; | |
import { Paginate, PaginateQuery } from 'nestjs-paginate'; | |
() | |
'menu-items') | (|
export class MenuItemController { | |
constructor(private readonly menuItemService: MenuItemService) {} | |
() | |
async create() { () createMenuItemDto: CreateMenuItemDto | |
return this.menuItemService.create(createMenuItemDto); | |
} | |
() | |
async findAll() { () query: PaginateQuery | |
return this.menuItemService.findAll(query); | |
} | |
':id') | (|
async findOne('id') id: string) { ( | |
return this.menuItemService.findOne(id); | |
} | |
':id') | (|
async update( | |
'id') id: string, ( | |
() updateMenuItemDto: UpdateMenuItemDto, | |
) { | |
return this.menuItemService.update(id, updateMenuItemDto); | |
} | |
':id') | (|
remove('id') id: string) { ( | |
return this.menuItemService.remove(id); | |
} | |
} | |