debian-mirror-gitlab/app/services/notes/destroy_service.rb
2020-03-09 13:42:32 +05:30

15 lines
320 B
Ruby

# frozen_string_literal: true
module Notes
class DestroyService < ::Notes::BaseService
def execute(note)
TodoService.new.destroy_target(note) do |note|
note.destroy
end
clear_noteable_diffs_cache(note)
end
end
end
Notes::DestroyService.prepend_if_ee('EE::Notes::DestroyService')