Skip to content

Commit

Permalink
feat: 친구 요청/수락/거절 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
ybkang1108 committed Aug 7, 2024
1 parent 347c20e commit dad6544
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions friends/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ def get_rating_average(self, obj):
return obj.rating_average()


class FriendRequestSerializer(serializers.ModelSerializer):
class Meta:
model = Friend
fields = "__all__"


class RestaurantSerializer(serializers.ModelSerializer):
# reviews = serializers.SerializerMethodField()

Expand Down
6 changes: 5 additions & 1 deletion friends/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
from rest_framework.decorators import api_view
from rest_framework.views import APIView

# from rest_framework.authentication import TokenAuthentication
# from rest_framework.permissions import IsAuthenticated
from rest_framework.views import APIView

# from rest_framework.authentication import TokenAuthentication
# from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
Expand All @@ -14,7 +18,7 @@
FriendRequestSerializer,
RestaurantlistSerializer,
FriendRecommendSerializer,
RestaurantSerializer,
# RestaurantSerializer,
)

# from .serializers import FriendSerializer, FriendRequestSerializer
Expand Down

0 comments on commit dad6544

Please sign in to comment.