mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: Merge discourse-automation (#26432)
Automation (previously known as discourse-automation) is now a core plugin.
This commit is contained in:
@ -0,0 +1,14 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module DiscourseAutomation
|
||||
class AutomationsController < ApplicationController
|
||||
requires_plugin DiscourseAutomation::PLUGIN_NAME
|
||||
before_action :ensure_admin
|
||||
|
||||
def trigger
|
||||
automation = DiscourseAutomation::Automation.find(params[:id])
|
||||
automation.trigger_in_background!(params.merge(kind: DiscourseAutomation::Triggers::API_CALL))
|
||||
render json: success_json
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user