gitlab-org--gitlab-foss/app/services/notes/destroy_service.rb
Sean McGivern ef454f68e8 Reset todo counters when the target is deleted
When the target is deleted, todos are destroyed, but we did not reset the todo
cache for users with todos on the deleted target. This would only update after
the next time the todo cache was updated for that user.
2017-12-18 12:23:00 +00:00

9 lines
174 B
Ruby

module Notes
class DestroyService < BaseService
def execute(note)
TodoService.new.destroy_target(note) do |note|
note.destroy
end
end
end
end