diff --git a/src/frontend/packages/cloud-foundry/src/cf-favorites-helpers.ts b/src/frontend/packages/cloud-foundry/src/cf-favorites-helpers.ts index 05c628ff38..ec23f4125f 100644 --- a/src/frontend/packages/cloud-foundry/src/cf-favorites-helpers.ts +++ b/src/frontend/packages/cloud-foundry/src/cf-favorites-helpers.ts @@ -5,12 +5,12 @@ import { CfAPIResource } from './store/types/cf-api.types'; export function getFavoriteFromCfEntity( entity, - entityKey: string, + entityType: string, favoritesConfigMapper: FavoritesConfigMapper ): UserFavorite { if (isCfEntity(entity as CfAPIResource)) { return favoritesConfigMapper.getFavoriteFromEntity( - entityKey, + entityType, 'cf', entity.entity.cfGuid, entity diff --git a/src/frontend/packages/core/src/core/user-favorite-helpers.ts b/src/frontend/packages/core/src/core/user-favorite-helpers.ts index 6be08fe176..7a73600412 100644 --- a/src/frontend/packages/core/src/core/user-favorite-helpers.ts +++ b/src/frontend/packages/core/src/core/user-favorite-helpers.ts @@ -10,14 +10,14 @@ export function isEndpointTypeFavorite(favorite: UserFavorite // Uses the endpoint definition to get the helper that can look up an entitty export function getFavoriteFromEntity( entity, - entityKey: string, + entityType: string, favoritesConfigMapper: FavoritesConfigMapper, - entityType: string + endpointType: string ): UserFavorite { // Use entity catalog to get favorite for the given endpoint type - const endpoint = entityCatalog.getEndpoint(entityType); + const endpoint = entityCatalog.getEndpoint(endpointType); if (endpoint && endpoint.definition && endpoint.definition.favoriteFromEntity) { - return endpoint.definition.favoriteFromEntity(entity, entityKey, favoritesConfigMapper); + return endpoint.definition.favoriteFromEntity(entity, entityType, favoritesConfigMapper); } return null; diff --git a/src/frontend/packages/core/src/shared/components/list/list-cards/meta-card/meta-card-base/meta-card.component.ts b/src/frontend/packages/core/src/shared/components/list/list-cards/meta-card/meta-card-base/meta-card.component.ts index 868d8477d4..0aec42062f 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-cards/meta-card/meta-card-base/meta-card.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-cards/meta-card/meta-card-base/meta-card.component.ts @@ -25,7 +25,7 @@ export function createMetaCardMenuItemSeparator() { return { label: '-', separator: true, - action: () => {} + action: () => { } }; } @@ -79,7 +79,7 @@ export class MetaCardComponent implements OnDestroy { first(), tap(entity => this.favorite = getFavoriteFromEntity( entity, - entityConfig.schema.key, + entityConfig.schema.entityType, this.favoritesConfigMapper, entityConfig.schema.endpointType ))