2021-04-17 20:07:23 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Users
|
|
|
|
class DismissUserCalloutService < BaseContainerService
|
|
|
|
def execute
|
2021-11-11 11:23:49 +05:30
|
|
|
callout.tap do |record|
|
|
|
|
record.update(dismissed_at: Time.current) if record.valid?
|
2021-04-17 20:07:23 +05:30
|
|
|
end
|
|
|
|
end
|
2021-11-11 11:23:49 +05:30
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def callout
|
|
|
|
current_user.find_or_initialize_callout(params[:feature_name])
|
|
|
|
end
|
2021-04-17 20:07:23 +05:30
|
|
|
end
|
|
|
|
end
|