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