2018-07-17 16:50:37 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-04-05 23:21:02 +00:00
|
|
|
module Notes
|
2018-10-16 16:21:16 +00:00
|
|
|
class DestroyService < ::Notes::BaseService
|
2016-04-05 23:21:02 +00:00
|
|
|
def execute(note)
|
2017-12-08 12:17:22 +00:00
|
|
|
TodoService.new.destroy_target(note) do |note|
|
|
|
|
note.destroy
|
|
|
|
end
|
2018-10-16 16:21:16 +00:00
|
|
|
|
|
|
|
clear_noteable_diffs_cache(note)
|
2016-04-05 23:21:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|