Updated promotions to not show if user is pro
This commit is contained in:
parent
280895a073
commit
cfda2c2562
@ -67,6 +67,12 @@ class InitialStateSerializer < ActiveModel::Serializer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def promotions
|
def promotions
|
||||||
|
if object.current_account
|
||||||
|
if object.current_account.is_pro
|
||||||
|
return []
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
ActiveModelSerializers::SerializableResource.new(Promotion.active, each_serializer: REST::PromotionSerializer)
|
ActiveModelSerializers::SerializableResource.new(Promotion.active, each_serializer: REST::PromotionSerializer)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user