demarches-normaliennes/app/jobs/admin_update_default_zones_job.rb
2024-08-22 09:26:48 +02:00

8 lines
224 B
Ruby

# frozen_string_literal: true
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