You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
620 B

import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces';
import { Service } from '@angular/core';
// Must stay auto-provided: the currency selector and portfolio filter form
// stories render gf-entity-logo without providing an override and resolve
// this from the root injector
@Service()
export class EntityLogoImageSourceService {
public getLogoUrlByAssetProfileIdentifier({
dataSource,
symbol
}: AssetProfileIdentifier) {
return `../api/v1/logo/${dataSource}/${symbol}`;
}
public getLogoUrlByUrl(url: string) {
return `../api/v1/logo?url=${encodeURIComponent(url)}`;
}
}