add CompactRecipePoint for loading recipe header data

This commit is contained in:
Anika Raemer 2025-09-28 18:41:56 +02:00
parent 380eb4cd21
commit 3638909761
8 changed files with 97 additions and 35 deletions

View file

@ -9,7 +9,7 @@ import { RecipeIngredientGroupDtoEntityMapper } from "../mappers/RecipeIngredien
import { RecipeInstructionStepDtoEntityMapper } from "../mappers/RecipeInstructionStepDtoEntityMapper.js";
/**
* Handles all user related routes
* Handles all recipe related routes
*/
const router = Router();
@ -21,7 +21,6 @@ const recipeInstructionStepMapper = new RecipeInstructionStepDtoEntityMapper();
const recipeMapper = new RecipeDtoEntityMapper(recipeInstructionStepMapper, recipeIngredientGroupMapper);
const recipeController = new RecipeController(recipeRepository, recipeMapper);
/**
* Create new recipe
*/
@ -34,15 +33,4 @@ router.post(
})
);
/**
* Load all recipes
*/
router.get(
"/",
asyncHandler(async (req, res) => {
const response = await recipeController.getAllRecipes();
res.status(201).json(response);
})
);
export default router;