Skip to content

Commit

Permalink
#71 fix : modify land get api return value (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
0321minji authored Aug 20, 2024
1 parent 4e2f80e commit fe7c6d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lands/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

logger = logging.getLogger(__name__)
from users.models import User
from lands.models import Location
from .selectors import ItemSelector, LandSelector
from rest_framework.exceptions import PermissionDenied
from .models import Land, Location, Item, ItemImage
Expand All @@ -19,7 +20,7 @@

# Create your views here.
class LandApi(APIView):
permission_classes=(AllowAny,)
permission_classes=(IsAuthenticated,)

class LandCreateInputSerializer(serializers.Serializer):
background=serializers.CharField(required=False,default=1)
Expand Down Expand Up @@ -188,7 +189,8 @@ def get(self, request):
# output_serializer = self.PublicLandItemOutputSerializer(lands_items, many=True)
return Response(
{'status':'sucess',
'data':{'owner':user.email,
'data':{'owner':{'email':user.email,
'name':user.name},
'land':output_serializer.data.get('land'),
'items':output_serializer.data.get('items')}}, status=status.HTTP_200_OK)

Expand Down

0 comments on commit fe7c6d7

Please sign in to comment.