Sha256: 485f8f08f4c0feb5fec76bf60fe7141b540da9d9cfbccd28731bb5fdbf3f0a51
Contents?: true
Size: 1.24 KB
Versions: 50
Compression:
Stored size: 1.24 KB
Contents
module Eco module API class UseCases class DefaultCases class DeleteCase < DefaultCase def process @cases.define("delete", type: :transform) do |people, session, options, usecase| delete = session.job_group("main").new("delete", usecase: usecase, type: :delete, sets: [:core, :details, :account]) people.each_with_index do |person, i| delete.add(person) end end @cases.define("delete", type: :sync) do |entries, people, session, options, usecase| delete = session.job_group("main").new("delete", usecase: usecase, type: :delete, sets: [:core, :details, :account]) strict_search = session.config.people.strict_search? && (!options[:search]&.key?(:strict) || options.dig(:search, :strict)) entries.each_with_index do |entry, i| if person = people.find(entry, strict: strict_search) delete.add(person) else session.logger.error("Entry(#{i}) - this person does not exist: #{entry.to_s(:identify)}") end end end end end end end end end
Version data entries
50 entries across 50 versions & 1 rubygems