Rename some API object and add update user to UserPoint. However, it seems to be broken somehow
This commit is contained in:
parent
81f1c3668b
commit
a9bd803112
12 changed files with 143 additions and 41 deletions
|
|
@ -19,7 +19,7 @@ const recipeIngredientMapper = new RecipeIngredientDtoEntityMapper();
|
|||
const recipeIngredientGroupMapper = new RecipeIngredientGroupDtoEntityMapper(recipeIngredientMapper);
|
||||
const recipeInstructionStepMapper = new RecipeInstructionStepDtoEntityMapper();
|
||||
const recipeMapper = new RecipeDtoEntityMapper(recipeInstructionStepMapper, recipeIngredientGroupMapper);
|
||||
const recipeController = new RecipeHandler(recipeRepository, recipeMapper);
|
||||
const recipeHandler = new RecipeHandler(recipeRepository, recipeMapper);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -34,7 +34,7 @@ router.post(
|
|||
"/create-or-update",
|
||||
asyncHandler(async(req, res) => {
|
||||
const requestDto: RecipeDto = req.body;
|
||||
const responseDto = await recipeController.createOrUpdateRecipe(requestDto);
|
||||
const responseDto = await recipeHandler.createOrUpdateRecipe(requestDto);
|
||||
res.status(201).json(responseDto);
|
||||
})
|
||||
)
|
||||
|
|
@ -47,7 +47,7 @@ router.get(
|
|||
"/:id",
|
||||
asyncHandler(async(req, res) => {
|
||||
const id = req.params.id;
|
||||
const responseDto = await recipeController.getRecipeById(id);
|
||||
const responseDto = await recipeHandler.getRecipeById(id);
|
||||
res.status(201).json(responseDto);
|
||||
})
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue