Skip to content

Commit

Permalink
Merge pull request #232 from bounswe/backend/feature/231-Format-respo…
Browse files Browse the repository at this point in the history
…nse-for-GET-/feed-response

Format response for /feed .
  • Loading branch information
EnesBaserr authored May 14, 2024
2 parents 026a04c + aff78d0 commit 60d036f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public ResponseEntity<?> getFeed(@RequestParam String type, Authentication authe
if ("following".equals(type)) {
if (authentication == null || !authentication.isAuthenticated()) {
// Return an empty set and a message for unauthenticated users
return ResponseEntity.ok(new SuccessResponse<>(200,Collections.emptyList(), "No content available. Please log in and follow other users !."));
return ResponseEntity.ok(new SuccessResponse<>(400,Collections.emptyList(), "No content available. Please log in and follow other users !."));
}
// Fetch following users' recipes for authenticated users
String username = authentication.getName();
Expand Down

0 comments on commit 60d036f

Please sign in to comment.