diff --git a/backend/product/serializers.py b/backend/product/serializers.py index 9d41a85..a9ca9dc 100644 --- a/backend/product/serializers.py +++ b/backend/product/serializers.py @@ -88,7 +88,11 @@ class ProductVariantSerialzier(serializers.ModelSerializer): return None def get_special_discount_link(self, obj): - return 'https://' + request = self.context.get('request') + if request.user.is_authenticated: + return 'https://google.com' + else: + return None def get_price_after_discount(self, obj): return f'{obj.price_after_discount:,.0f} تومانءءء'