diff options
author | Rémy Coutable <remy@rymai.me> | 2017-02-14 20:10:45 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-14 20:10:45 +0300 |
commit | 87f82f6e7e29da561c7896475d98bebec276885d (patch) | |
tree | a5765a2389b46200fb51eff5f508bf4857fd30f9 /app/services | |
parent | 777604550c7c2f47e3dc807987aae5a4cdcc82da (diff) | |
parent | 1fc6f6cc7101a9c4dee694682a3533a5e4ba3447 (diff) |
Merge branch '19302-wiki-page-delete-does-not-trigger-the-webhook' into 'master'
Resolve "Wiki page delete does not trigger the webhook"
Closes #19302
See merge request !8198
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/wiki_pages/destroy_service.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/wiki_pages/destroy_service.rb b/app/services/wiki_pages/destroy_service.rb new file mode 100644 index 00000000000..6b93fb2f6d7 --- /dev/null +++ b/app/services/wiki_pages/destroy_service.rb @@ -0,0 +1,11 @@ +module WikiPages + class DestroyService < WikiPages::BaseService + def execute(page) + if page&.delete + execute_hooks(page, 'delete') + end + + page + end + end +end |