demarches-normaliennes/app/jobs/admin_update_default_zones_job.rb
2023-05-16 09:40:53 +02:00

6 lines
193 B
Ruby

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