Add recipe deletion functionality and enhance inventory consumption details
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Body, Controller, Get, Param, ParseIntPipe, Post, Patch } from '@nestjs/common';
|
||||
import { Body, Controller, Delete, Get, HttpCode, Param, ParseIntPipe, Post, Patch } from '@nestjs/common';
|
||||
import { RecipesService } from './recipes.service';
|
||||
import { CreateRecipeDto } from './dto/create-recipe.dto';
|
||||
|
||||
@@ -33,4 +33,10 @@ export class RecipesController {
|
||||
) {
|
||||
return this.recipesService.update(id, createRecipeDto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
@HttpCode(204)
|
||||
async remove(@Param('id', ParseIntPipe) id: number) {
|
||||
return this.recipesService.remove(id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user