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
96d33f7c
authored
Jun 20, 2025
by
Alba María Álvarez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bugfix(user): eliminado findByUsername en el controlador
parent
5ac10f33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
src/main/java/com/example/apprecetas/recipe/infrastructure/controller/ReadRecipeController.java
src/main/java/com/example/apprecetas/recipe/infrastructure/controller/ReadRecipeController.java
View file @
96d33f7c
...
@@ -34,8 +34,8 @@ public class ReadRecipeController {
...
@@ -34,8 +34,8 @@ public class ReadRecipeController {
public
ResponseEntity
<
Page
<
RecipeOutputDto
>>
readAll
(
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
page
,
public
ResponseEntity
<
Page
<
RecipeOutputDto
>>
readAll
(
@RequestParam
(
required
=
false
,
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
required
=
false
,
defaultValue
=
"6"
)
int
size
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
"6"
)
int
size
)
{
Pageable
pageable
=
PageRequest
.
of
(
page
,
size
);
Pageable
pageable
=
PageRequest
.
of
(
page
,
size
);
String
username
=
SecurityContextHolder
.
getContext
().
getAuthentication
().
getName
();
String
email
=
SecurityContextHolder
.
getContext
().
getAuthentication
().
getName
();
User
user
=
readUserUseCase
.
readBy
Username
(
username
);
User
user
=
readUserUseCase
.
readBy
Email
(
email
);
if
(
service
.
readAllByUser
(
user
.
getId
(),
pageable
).
isEmpty
())
{
if
(
service
.
readAllByUser
(
user
.
getId
(),
pageable
).
isEmpty
())
{
return
ResponseEntity
.
noContent
().
build
();
return
ResponseEntity
.
noContent
().
build
();
...
...
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