-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GET users/{userId} endpoint implemented.(User Profile & bookmark reci…
…pe related infos.)
- Loading branch information
1 parent
83e1d60
commit 6e2d31d
Showing
7 changed files
with
171 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
backend/src/main/java/com/group1/cuisines/dao/response/ErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.group1.cuisines.dao.response; | ||
import lombok.*; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
public class ErrorResponse { | ||
private String message; | ||
} |
21 changes: 21 additions & 0 deletions
21
backend/src/main/java/com/group1/cuisines/dto/BookmarkDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.group1.cuisines.dto; | ||
import lombok.*; | ||
import java.util.List; | ||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class BookmarkDto { | ||
|
||
private Integer id; | ||
private String name; | ||
private String instructions; | ||
private List<IngredientsDto> ingredients; | ||
private int servingSize; | ||
private Integer cookTime; | ||
//private List<String> images; | ||
private CuisineDto cuisine; | ||
private DishDto dish; | ||
private Double avgRating; | ||
|
||
private AuthorDto author; | ||
} |
24 changes: 24 additions & 0 deletions
24
backend/src/main/java/com/group1/cuisines/dto/UserProfileDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.group1.cuisines.dto; | ||
import lombok.*; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
|
||
|
||
public class UserProfileDto { | ||
private Integer id; | ||
private String username; | ||
private String name; | ||
private String bio; | ||
private Integer followersCount; | ||
private Integer followingCount; | ||
//private String gender; | ||
// private String profilePicture; | ||
// private List<String> diets; | ||
private Integer recipeCount; | ||
private List<BookmarkDto> bookmarks; | ||
private List<RecipeDetailsDto> recipes; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters