mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
DEV: Refactor DiscourseAutomation::DestroyAutomation
a bit
Small followup to 932bd6b.
This commit is contained in:

committed by
Loïc Guitaut

parent
0641d3e4b3
commit
f87333c4e0
@ -81,7 +81,7 @@ module DiscourseAutomation
|
||||
end
|
||||
|
||||
def destroy
|
||||
DiscourseAutomation::DestroyAutomation.call(service_params) do
|
||||
DiscourseAutomation::Destroy.call(service_params) do
|
||||
on_success { render(json: success_json) }
|
||||
on_model_not_found(:automation) { raise Discourse::NotFound }
|
||||
on_failed_policy(:can_destroy_automation) { raise Discourse::InvalidAccess }
|
||||
|
Reference in New Issue
Block a user