demarches-normaliennes/app/jobs/admin_update_default_zones_job.rb

9 lines
224 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
2023-03-31 15:25:17 +02:00
class AdminUpdateDefaultZonesJob < ApplicationJob
def perform(admin)
tchap_hs = APITchap::HsAdapter.new(admin.email).to_hs
admin.default_zones << Zone.default_for(tchap_hs)
end
end