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
05eabe8b
authored
Aug 06, 2025
by
Alba María Álvarez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
style(recipe): cambio mensaje de error
parent
6ce1d868
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
src/main/java/com/example/apprecetas/recipe/application/impl/DeleteRecipeUseCaseImpl.java
src/main/java/com/example/apprecetas/recipe/application/impl/ReadRecipeUseCaseImpl.java
src/main/java/com/example/apprecetas/recipe/infrastructure/repository/impl/UpdateRecipeRepositoryImpl.java
src/main/java/com/example/apprecetas/recipe/application/impl/DeleteRecipeUseCaseImpl.java
View file @
05eabe8b
...
@@ -18,7 +18,7 @@ public class DeleteRecipeUseCaseImpl implements DeleteRecipeUseCase {
...
@@ -18,7 +18,7 @@ public class DeleteRecipeUseCaseImpl implements DeleteRecipeUseCase {
@Override
@Override
public
void
delete
(
String
id
)
{
public
void
delete
(
String
id
)
{
RecipeDocument
recipeDocument
=
readRepository
.
readById
(
id
)
RecipeDocument
recipeDocument
=
readRepository
.
readById
(
id
)
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
La receta con id "
+
id
+
" no existe
"
));
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
Receta con id "
+
id
+
" no encontrada
"
));
deleteRepository
.
delete
(
recipeDocument
);
deleteRepository
.
delete
(
recipeDocument
);
}
}
}
}
src/main/java/com/example/apprecetas/recipe/application/impl/ReadRecipeUseCaseImpl.java
View file @
05eabe8b
...
@@ -23,7 +23,7 @@ public class ReadRecipeUseCaseImpl implements ReadRecipeUseCase {
...
@@ -23,7 +23,7 @@ public class ReadRecipeUseCaseImpl implements ReadRecipeUseCase {
@Override
@Override
public
Recipe
readById
(
String
id
)
{
public
Recipe
readById
(
String
id
)
{
RecipeDocument
recipeDocument
=
repository
.
readById
(
id
)
RecipeDocument
recipeDocument
=
repository
.
readById
(
id
)
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
La receta con id "
+
id
+
" no existe
"
));
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
Receta con id "
+
id
+
" no encontrada
"
));
return
mapper
.
mapDocument
(
recipeDocument
);
return
mapper
.
mapDocument
(
recipeDocument
);
}
}
...
...
src/main/java/com/example/apprecetas/recipe/infrastructure/repository/impl/UpdateRecipeRepositoryImpl.java
View file @
05eabe8b
...
@@ -16,7 +16,7 @@ public class UpdateRecipeRepositoryImpl implements UpdateRecipeRepository {
...
@@ -16,7 +16,7 @@ public class UpdateRecipeRepositoryImpl implements UpdateRecipeRepository {
@Override
@Override
public
RecipeDocument
update
(
String
id
,
RecipeDocument
recipeDocument
)
{
public
RecipeDocument
update
(
String
id
,
RecipeDocument
recipeDocument
)
{
RecipeDocument
recipe
=
recipeRepository
.
findById
(
id
)
RecipeDocument
recipe
=
recipeRepository
.
findById
(
id
)
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
La receta con id "
+
id
+
" no existe
"
));
.
orElseThrow
(()
->
new
EntityNotFoundException
(
"
Receta con id "
+
id
+
" no encontrada
"
));
recipe
.
setName
(
recipeDocument
.
getName
());
recipe
.
setName
(
recipeDocument
.
getName
());
recipe
.
setDescription
(
recipeDocument
.
getDescription
());
recipe
.
setDescription
(
recipeDocument
.
getDescription
());
...
...
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