~cytrogen/masto-fe

ref: e4fd9503ec7c941299ff6572f2e426e75f211e7d masto-fe/app/controllers/admin/webhooks/secrets_controller.rb -rw-r--r-- 374 bytes
e4fd9503 — Eugen Rochko Change design of dropdowns in web UI (#25107) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Admin
  class Webhooks::SecretsController < BaseController
    before_action :set_webhook

    def rotate
      authorize @webhook, :rotate_secret?
      @webhook.rotate_secret!
      redirect_to admin_webhook_path(@webhook)
    end

    private

    def set_webhook
      @webhook = Webhook.find(params[:webhook_id])
    end
  end
end