mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Add interactor for renewal
This commit is contained in:
parent
c0fc7ebca9
commit
7dd3005bf3
3 changed files with 18 additions and 3 deletions
|
@ -13,7 +13,9 @@ class Registrar
|
|||
@expire_date = params[:expire_date].to_date
|
||||
@domains = domains_by_date(@expire_date)
|
||||
if domain_ids_for_bulk_renew.present?
|
||||
flash[:notice] = t(:bulk_renew_enqueued)
|
||||
domains = Epp::Domain.where(id: domain_ids_for_bulk_renew).to_a
|
||||
task = Domains::BulkRenew::Start.run(domains: domains)
|
||||
flash[:notice] = t(:bulk_renew_completed)
|
||||
end
|
||||
render file: 'registrar/bulk_change/new', locals: { active_tab: :bulk_renew }
|
||||
end
|
||||
|
@ -37,7 +39,7 @@ class Registrar
|
|||
end
|
||||
|
||||
def domain_ids_for_bulk_renew
|
||||
params.dig('domain_ids').reject{ |id| id.blank? }
|
||||
params.dig('domain_ids')&.reject{ |id| id.blank? }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue