gitlab-org--gitlab-foss/app/services/wiki_pages/destroy_service.rb
Mark Fletcher 1fc6f6cc71 Execute web hooks for WikiPage delete operation
* Add a new DestroyService for Wiki Pages
* Alter WikiPagesController to use the new service
2017-02-14 12:07:11 +05:30

11 lines
187 B
Ruby

module WikiPages
class DestroyService < WikiPages::BaseService
def execute(page)
if page&.delete
execute_hooks(page, 'delete')
end
page
end
end
end