Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Alba María Álvarez
/
AppRecetas
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1dcad58a
authored
Jun 05, 2025
by
Alba María Álvarez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
perf(CreateRecipe): añadida en el servicio referencia a la receta en los ingredientes y pasos
parent
dfea2798
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
src/main/java/com/example/apprecetas/recipe/application/impl/CreateRecipeUseCaseImpl.java
src/main/java/com/example/apprecetas/recipe/application/impl/CreateRecipeUseCaseImpl.java
View file @
1dcad58a
...
@@ -22,6 +22,10 @@ public class CreateRecipeUseCaseImpl implements CreateRecipeUseCase {
...
@@ -22,6 +22,10 @@ public class CreateRecipeUseCaseImpl implements CreateRecipeUseCase {
@Override
@Override
public
RecipeOutputDto
create
(
RecipeInputDto
recipeInputDto
)
{
public
RecipeOutputDto
create
(
RecipeInputDto
recipeInputDto
)
{
RecipeJpa
recipeJpa
=
mapper
.
mapJpa
(
mapper
.
map
(
recipeInputDto
));
RecipeJpa
recipeJpa
=
mapper
.
mapJpa
(
mapper
.
map
(
recipeInputDto
));
recipeJpa
.
getSteps
().
forEach
(
step
->
{
step
.
setRecipe
(
recipeJpa
);});
recipeJpa
.
getIngredients
().
forEach
(
ingredient
->
{
ingredient
.
setRecipe
(
recipeJpa
);});
RecipeJpa
savedRecipe
=
repository
.
create
(
recipeJpa
);
RecipeJpa
savedRecipe
=
repository
.
create
(
recipeJpa
);
return
mapper
.
map
(
mapper
.
mapJpa
(
savedRecipe
));
return
mapper
.
map
(
mapper
.
mapJpa
(
savedRecipe
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment