From 3fc7a9a4b52c9e2faf2bc29ddc2b412c7434aa6d Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sat, 15 Dec 2018 22:59:15 +0100 Subject: [PATCH] camelcase in meta object --- app/controllers/client_prefixes_controller.rb | 2 +- app/controllers/clients_controller.rb | 2 +- app/controllers/dois_controller.rb | 20 +++++++++---------- app/controllers/media_controller.rb | 2 +- app/controllers/metadata_controller.rb | 2 +- app/controllers/prefixes_controller.rb | 2 +- .../provider_prefixes_controller.rb | 2 +- app/controllers/providers_controller.rb | 6 +++--- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/controllers/client_prefixes_controller.rb b/app/controllers/client_prefixes_controller.rb index 54d3175da..7738b1a5e 100644 --- a/app/controllers/client_prefixes_controller.rb +++ b/app/controllers/client_prefixes_controller.rb @@ -53,7 +53,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => @client_prefixes.total_pages, + "totalPages" => @client_prefixes.total_pages, page: page[:number].to_i, years: years }.compact diff --git a/app/controllers/clients_controller.rb b/app/controllers/clients_controller.rb index 85bf650ff..b53b873b1 100644 --- a/app/controllers/clients_controller.rb +++ b/app/controllers/clients_controller.rb @@ -45,7 +45,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number], years: years, providers: providers, diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 674dc4443..9fc5b6fe0 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -62,7 +62,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number].to_i }.compact @@ -159,23 +159,23 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number], states: states, - "resource-types" => resource_types, + "resourceTypes" => resource_types, created: created, registered: registered, providers: providers, clients: clients, prefixes: prefixes, - "schema-versions" => schema_versions, + "schemaVersions" => schema_versions, sources: sources, - "link-checks-status" => link_checks_status, - "links-checked" => links_checked, - "links-with-schema-org" => links_with_schema_org, - "link-checks-schema-org-id" => link_checks_schema_org_id, - "link-checks-dc-identifier" => link_checks_dc_identifier, - "link-checks-citation-doi" => link_checks_citation_doi + "linkChecksStatus" => link_checks_status, + "linksChecked" => links_checked, + "linksWithSchemaOrg" => links_with_schema_org, + "linkChecksSchemaOrgId" => link_checks_schema_org_id, + "linkChecksDcIdentifier" => link_checks_dc_identifier, + "linkChecksCitationDoi" => link_checks_citation_doi }.compact options[:links] = { diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb index 957393af6..d5d8ac84f 100644 --- a/app/controllers/media_controller.rb +++ b/app/controllers/media_controller.rb @@ -25,7 +25,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number].to_i }.compact diff --git a/app/controllers/metadata_controller.rb b/app/controllers/metadata_controller.rb index d83a37575..8ad2ef901 100644 --- a/app/controllers/metadata_controller.rb +++ b/app/controllers/metadata_controller.rb @@ -28,7 +28,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number].to_i }.compact diff --git a/app/controllers/prefixes_controller.rb b/app/controllers/prefixes_controller.rb index ee91e892d..bb03a3191 100644 --- a/app/controllers/prefixes_controller.rb +++ b/app/controllers/prefixes_controller.rb @@ -84,7 +84,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => @prefixes.total_pages, + "totalPages" => @prefixes.total_pages, page: page[:number].to_i, states: states, providers: providers, diff --git a/app/controllers/provider_prefixes_controller.rb b/app/controllers/provider_prefixes_controller.rb index e84547a24..46c89e67b 100644 --- a/app/controllers/provider_prefixes_controller.rb +++ b/app/controllers/provider_prefixes_controller.rb @@ -83,7 +83,7 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => @provider_prefixes.total_pages, + "totalPages" => @provider_prefixes.total_pages, page: page[:number].to_i, states: states, providers: providers, diff --git a/app/controllers/providers_controller.rb b/app/controllers/providers_controller.rb index 3f60e76ed..6d5cc1eeb 100644 --- a/app/controllers/providers_controller.rb +++ b/app/controllers/providers_controller.rb @@ -45,12 +45,12 @@ def index options = {} options[:meta] = { total: total, - "total-pages" => total_pages, + "totalPages" => total_pages, page: page[:number], years: years, regions: regions, - "organization-types" => organization_types, - "focus-areas" => focus_areas + "organizationTypes" => organization_types, + "focusAreas" => focus_areas }.compact options[:links] = {