Updated promotions to not show if user is pro

This commit is contained in:
mgabdev 2019-09-14 09:53:49 -04:00
parent 280895a073
commit cfda2c2562

View File

@ -67,6 +67,12 @@ class InitialStateSerializer < ActiveModel::Serializer
end
def promotions
if object.current_account
if object.current_account.is_pro
return []
end
end
ActiveModelSerializers::SerializableResource.new(Promotion.active, each_serializer: REST::PromotionSerializer)
end