gitlab-org--gitlab-foss/app/services/notes/destroy_service.rb

14 lines
254 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-04-05 19:21:02 -04:00
module Notes
class DestroyService < ::Notes::BaseService
2016-04-05 19:21:02 -04:00
def execute(note)
TodoService.new.destroy_target(note) do |note|
note.destroy
end
clear_noteable_diffs_cache(note)
2016-04-05 19:21:02 -04:00
end
end
end