From 78acad0cc8e61deb0e04c24ffa1d8181b338ccfa Mon Sep 17 00:00:00 2001 From: Yuhuai Liu Date: Fri, 18 Aug 2023 08:50:18 -0400 Subject: [PATCH] Update the way we get contributor id. Remove registries discover route --- app/models/search-result.ts | 4 ++-- lib/registries/addon/routes.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/search-result.ts b/app/models/search-result.ts index 5ea77ae317..80a1f813da 100644 --- a/app/models/search-result.ts +++ b/app/models/search-result.ts @@ -79,10 +79,10 @@ export default class SearchResultModel extends Model { // return something } else if (this.resourceMetadata.creator) { return this.resourceMetadata.creator?.map((item: any) => - ({ name: item.name[0]['@value'], absoluteUrl: item.identifier?.[0]?.['@value'] })); + ({ name: item.name[0]['@value'], absoluteUrl: item['@id'] })); } else if (this.isContainedBy?.[0]?.creator) { return this.isContainedBy[0].creator.map((item: any) => - ({ name: item.name?.[0]?.['@value'], absoluteUrl: item.identifier?.[0]?.['@value'] })); + ({ name: item.name?.[0]?.['@value'], absoluteUrl: item['@id'] })); } } diff --git a/lib/registries/addon/routes.ts b/lib/registries/addon/routes.ts index e26f07fd5b..c2f043cb37 100644 --- a/lib/registries/addon/routes.ts +++ b/lib/registries/addon/routes.ts @@ -2,7 +2,7 @@ import buildRoutes from 'ember-engines/routes'; export default buildRoutes(function() { this.route('index', { path: '/registries' }); - this.route('discover', { path: '/registries/discover' }); + // this.route('discover', { path: '/registries/discover' }); this.route('branded', { path: '/registries/:providerId' }, function() { this.route('discover'); this.route('new');