Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/users/dismiss_user_callout_service.rb')
-rw-r--r--app/services/users/dismiss_user_callout_service.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/users/dismiss_user_callout_service.rb b/app/services/users/dismiss_user_callout_service.rb
new file mode 100644
index 00000000000..f05c44186bb
--- /dev/null
+++ b/app/services/users/dismiss_user_callout_service.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module Users
+ class DismissUserCalloutService < BaseContainerService
+ def execute
+ current_user.find_or_initialize_callout(params[:feature_name]).tap do |callout|
+ callout.update(dismissed_at: Time.current) if callout.valid?
+ end
+ end
+ end
+end