From 8c886053154a53858fc513722d806caa524ed004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atakan=20Ya=C5=9Far?= Date: Wed, 15 May 2024 14:06:24 +0300 Subject: [PATCH] fix(backend): rename to selfRating --- .../src/main/java/com/group1/cuisines/dto/RecipeDetailsDto.java | 2 +- .../main/java/com/group1/cuisines/services/RecipeService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/group1/cuisines/dto/RecipeDetailsDto.java b/backend/src/main/java/com/group1/cuisines/dto/RecipeDetailsDto.java index 06f526ff..623dc8ab 100644 --- a/backend/src/main/java/com/group1/cuisines/dto/RecipeDetailsDto.java +++ b/backend/src/main/java/com/group1/cuisines/dto/RecipeDetailsDto.java @@ -22,7 +22,7 @@ public class RecipeDetailsDto { private CuisineDto cuisine; private DishDto dish; private Double avgRating; - private Integer userRating; + private Integer selfRating; private AuthorDto author; diff --git a/backend/src/main/java/com/group1/cuisines/services/RecipeService.java b/backend/src/main/java/com/group1/cuisines/services/RecipeService.java index ffc0f967..c39fb45d 100644 --- a/backend/src/main/java/com/group1/cuisines/services/RecipeService.java +++ b/backend/src/main/java/com/group1/cuisines/services/RecipeService.java @@ -235,7 +235,7 @@ else if(r.getDish() != null && r.getDish().getCuisines().isEmpty()){ .cuisine(cuisineDto) .dish(new DishDto(r.getDish().getId(), r.getDish().getName(), r.getDish().getImage())) .avgRating(r.getAverageRating()) - .userRating(userRating) + .selfRating(userRating) .author(new AuthorDto(r.getUser().getId(), r.getUser().getFirstName() , r.getUser().getUsername(), r.getUser().getFollowing().size(), r.getUser().getFollowers().size(), r.getUser().getRecipeCount())) .build(); }