diff --git a/app/controllers/export_controller.rb b/app/controllers/export_controller.rb index 69031155f..7a3e0214e 100644 --- a/app/controllers/export_controller.rb +++ b/app/controllers/export_controller.rb @@ -12,6 +12,12 @@ class ExportController < ApplicationController "registration_agency" => "DOI Registration Agency" } + REGIONS = { + "APAC" => "Asia and Pacific", + "EMEA" => "EMEA", + "AMER" => "Americas" + } + def contacts authorize! :export, :contacts @@ -155,7 +161,7 @@ def organizations isActive: provider.deleted_at.blank?, accountDescription: provider.description, accountWebsite: provider.website, - region: provider.region, + region: provider.region.present? ? export_region(provider.region) : nil, focusArea: provider.focus_area, sector: provider.organization_type, accountType: export_member_type(provider.member_type), @@ -287,4 +293,8 @@ def export_date(date) def export_member_type(member_type) MEMBER_TYPES[member_type] end + + def export_region(region) + REGIONS[region] + end end