summaryrefslogtreecommitdiff
path: root/app/services/notes/destroy_service.rb
blob: ee8a680fcb4916c7163dae2284c417c0c7646feb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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')