Skip to content

Commit

Permalink
Revert "πŸš‘ fix : cookie settings..."
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeunho1227 authored May 27, 2024
1 parent 31297a7 commit 19ccc86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions booth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def likes(self, request, pk=None):
booth_like = BoothLike.objects.create(booth=booth, key=key, fingerprint=fingerprint)
serializer = LikeSerializer(booth_like)
response = Response(serializer.data)
response.set_cookie(booth_id, key, max_age=5*24*60*60, domain='.dgu-mua.site', httponly=True, secure=True, samesite='none')
response.set_cookie(booth_id, key, max_age=5*24*60*60, httponly=True, secure=True, samesite='none')
return response

elif request.method == 'DELETE':
Expand All @@ -131,7 +131,7 @@ def likes(self, request, pk=None):
if booth_like.exists():
booth_like.delete()
response = Response({'message': 'μ’‹μ•„μš”κ°€ μ·¨μ†Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.'})
response.delete_cookie(booth_id, domain='.dgu-mua.site', samesite='none')
response.delete_cookie(booth_id, samesite='none')
return response
else:
return Response({'error': 'ν•΄λ‹Ή λΆ€μŠ€μ— λŒ€ν•œ μ’‹μ•„μš”λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.'}, status=status.HTTP_400_BAD_REQUEST)
Expand Down

0 comments on commit 19ccc86

Please sign in to comment.