debian-mirror-gitlab/app/services/issuable/destroy_service.rb

15 lines
357 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Issuable
class DestroyService < IssuableBaseService
def execute(issuable)
TodoService.new.destroy_target(issuable) do |issuable|
if issuable.destroy
issuable.update_project_counter_caches
2018-05-09 12:01:36 +05:30
issuable.assignees.each(&:invalidate_cache_counts)
2018-03-17 18:26:18 +05:30
end
end
end
end
end