Browse Source

Destructure query parameters in controllers

pull/7505/head
Thomas Kaul 4 weeks ago
parent
commit
bf426a855f
  1. 3
      apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts
  2. 8
      libs/ui/src/lib/services/data.service.ts

3
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.component.ts

@ -341,8 +341,7 @@ export class GfAccountDetailDialogComponent implements OnInit {
}
],
range: DEFAULT_DATE_RANGE,
withExcludedAccounts: true,
withItems: true
withExcludedAccounts: true
})
.pipe(takeUntilDestroyed(this.destroyRef))
}).subscribe({

8
libs/ui/src/lib/services/data.service.ts

@ -731,13 +731,11 @@ export class DataService {
public fetchPortfolioPerformance({
filters,
range,
withExcludedAccounts = false,
withItems = false
withExcludedAccounts = false
}: {
filters?: Filter[];
range: DateRange;
withExcludedAccounts?: boolean;
withItems?: boolean;
}): Observable<PortfolioPerformanceResponse> {
let params = this.buildFiltersAsQueryParams({ filters });
params = params.append('range', range);
@ -746,10 +744,6 @@ export class DataService {
params = params.append('withExcludedAccounts', withExcludedAccounts);
}
if (withItems) {
params = params.append('withItems', withItems);
}
return this.http
.get<any>(`/api/v2/portfolio/performance`, {
params

Loading…
Cancel
Save