demarches-normaliennes/app/jobs/admin_update_default_zones_job.rb

7 lines
193 B
Ruby
Raw Normal View History

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