Browse Source

Refactoring

pull/2479/head
Thomas 2 years ago
parent
commit
5d9cea3f5b
  1. 5
      apps/api/src/app/admin/admin.service.ts
  2. 2
      apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts
  3. 2
      apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html

5
apps/api/src/app/admin/admin.service.ts

@ -46,12 +46,13 @@ export class AdminService {
symbol
}: UniqueAsset & { currency?: string }): Promise<SymbolProfile | never> {
try {
if (dataSource === 'MANUAL')
return await this.symbolProfileService.add({
if (dataSource === 'MANUAL') {
return this.symbolProfileService.add({
currency,
dataSource,
symbol
});
}
const assetProfiles = await this.dataProviderService.getAssetProfiles([
{ dataSource, symbol }

2
apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.component.ts

@ -24,7 +24,7 @@ import { AdminService } from '@ghostfolio/client/services/admin.service';
})
export class CreateAssetProfileDialog implements OnInit, OnDestroy {
public createAssetProfileForm: FormGroup;
public mode: 'auto' | 'manual' = 'auto';
public mode: 'auto' | 'manual';
public constructor(
public readonly adminService: AdminService,

2
apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html

@ -6,7 +6,7 @@
>
<h1 i18n mat-dialog-title>Add Asset Profile</h1>
<div class="flex-grow-1 py-3" mat-dialog-content>
<div class="my-2">
<div class="mb-3">
<mat-radio-group
color="primary"
[value]="mode"

Loading…
Cancel
Save