food
This commit is contained in:
@@ -59,7 +59,7 @@ export class FoodController {
|
|||||||
|
|
||||||
@UseGuards(AdminAuthGuard)
|
@UseGuards(AdminAuthGuard)
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@Get(':id')
|
@Get('admin/foods/:id')
|
||||||
@ApiOperation({ summary: 'Get a food by id' })
|
@ApiOperation({ summary: 'Get a food by id' })
|
||||||
@ApiParam({ name: 'id', required: true })
|
@ApiParam({ name: 'id', required: true })
|
||||||
@ApiOkResponse({ description: 'The food', type: CreateFoodDto })
|
@ApiOkResponse({ description: 'The food', type: CreateFoodDto })
|
||||||
@@ -70,7 +70,7 @@ export class FoodController {
|
|||||||
|
|
||||||
@UseGuards(AdminAuthGuard)
|
@UseGuards(AdminAuthGuard)
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@Patch(':id')
|
@Patch('admin/foods/:id')
|
||||||
@ApiOperation({ summary: 'Update a food' })
|
@ApiOperation({ summary: 'Update a food' })
|
||||||
@ApiParam({ name: 'id', required: true })
|
@ApiParam({ name: 'id', required: true })
|
||||||
@ApiBody({ type: UpdateFoodDto })
|
@ApiBody({ type: UpdateFoodDto })
|
||||||
@@ -80,7 +80,7 @@ export class FoodController {
|
|||||||
}
|
}
|
||||||
@UseGuards(AdminAuthGuard)
|
@UseGuards(AdminAuthGuard)
|
||||||
@ApiBearerAuth()
|
@ApiBearerAuth()
|
||||||
@Delete(':id')
|
@Delete('admin/foods/:id')
|
||||||
@ApiOperation({ summary: 'Delete (soft) a food' })
|
@ApiOperation({ summary: 'Delete (soft) a food' })
|
||||||
@ApiParam({ name: 'id', required: true })
|
@ApiParam({ name: 'id', required: true })
|
||||||
@ApiResponse({ status: 200, description: 'Food deleted' })
|
@ApiResponse({ status: 200, description: 'Food deleted' })
|
||||||
|
|||||||
Reference in New Issue
Block a user