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.
 
 
 
 
 

18 lines
498 B

import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces';
import { Service } from '@angular/core';
// Must stay auto-provided so it can be mocked in Storybook
@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)}`;
}
}