dawarich/app/services/points_limit_exceeded.rb

19 lines
290 B
Ruby
Raw Normal View History

2025-05-16 12:51:48 -04:00
class PointsLimitExceeded
def initialize(user)
@user = user
end
def call
return false if DawarichSettings.self_hosted?
return true if @user.points.count >= points_limit
false
end
private
def points_limit
DawarichSettings::BASIC_PAID_PLAN_LIMIT
end
end