mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: prompts new webhook events
This commit is contained in:

committed by
Guo Xiang Tan

parent
115461b395
commit
00d5facf36
@ -1,5 +1,5 @@
|
||||
class Admin::WebHooksController < Admin::AdminController
|
||||
before_filter :fetch_web_hook, only: %i(show update destroy list_events ping)
|
||||
before_filter :fetch_web_hook, only: %i(show update destroy list_events bulk_events ping)
|
||||
|
||||
def index
|
||||
limit = 50
|
||||
@ -72,6 +72,12 @@ class Admin::WebHooksController < Admin::AdminController
|
||||
render json: MultiJson.dump(json), status: 200
|
||||
end
|
||||
|
||||
def bulk_events
|
||||
params.require(:ids)
|
||||
web_hook_events = @web_hook.web_hook_events.where(id: params[:ids])
|
||||
render_serialized(web_hook_events, AdminWebHookEventSerializer)
|
||||
end
|
||||
|
||||
def redeliver_event
|
||||
web_hook_event = WebHookEvent.find(params[:event_id])
|
||||
|
||||
|
Reference in New Issue
Block a user