debian-mirror-gitlab/app/controllers/users/callouts_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
644 B
Ruby
Raw Normal View History

2022-01-26 12:08:38 +05:30
# frozen_string_literal: true
module Users
class CalloutsController < ApplicationController
feature_category :navigation
2022-07-23 23:45:48 +05:30
urgency :low
2022-01-26 12:08:38 +05:30
def create
if callout.persisted?
respond_to do |format|
format.json { head :ok }
end
else
respond_to do |format|
format.json { head :bad_request }
end
end
end
private
def callout
Users::DismissCalloutService.new(
container: nil, current_user: current_user, params: { feature_name: feature_name }
).execute
end
def feature_name
params.require(:feature_name)
end
end
end