Skip to content

Commit

Permalink
feat: 친구 평가 후 is_evaluated가 true가 되도록 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
ybkang1108 committed Aug 15, 2024
1 parent fa0705d commit ff0e630
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions friends/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ def friend_restaurant_list(request, pk):
friend.reliability -= 5
friend.save()

check_evaluation = Friend.objects.get(user=request.user, friend=friend)
check_evaluation.is_evaluated = True
check_evaluation.save()

return Response(
{
"message": "Friend evaluated successfully",
"reliability": friend.reliability,
"is_Evaluated": Friend.objects.get(
user=request.user, friend=friend
).is_evaluated,
},
status=status.HTTP_200_OK,
)
Expand Down

0 comments on commit ff0e630

Please sign in to comment.