Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Bugfix/fix export functionality of platforms (#4379)
Thomas Kaul8f4f29571bc7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex c518d92f06..e1adcd3baf 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Fixed+- Handled an exception in the export functionality related to platforms- Handled an exception in the benchmark service related to unnamed asset profiles## 2.142.0 - 2025-02-28diff --git a/apps/api/src/app/export/export.service.ts b/apps/api/src/app/export/export.service.tsindex 8d7585c01d..c6c24d6af5 100644--- a/apps/api/src/app/export/export.service.ts+++ b/apps/api/src/app/export/export.service.ts@@ -26,7 +26,7 @@ export class ExportService {userCurrency: string;userId: string;}): Promise<Export> {- const platforms: Platform[] = [];+ const platformsMap: { [platformId: string]: Platform } = {};const accounts = (await this.accountService.accounts({@@ -46,15 +46,11 @@ export class ExportService {id,isExcluded,name,- platformId,- Platform: platform+ Platform: platform,+ platformId}) => {- if (- !platforms.some(({ id: currentPlatformId }) => {- return currentPlatformId === platform.id;- })- ) {- platforms.push(platform);+ if (platformId) {+ platformsMap[platformId] = platform;}return {@@ -99,7 +95,7 @@ export class ExportService {return {meta: { date: new Date().toISOString(), version: environment.version },accounts,- platforms,+ platforms: Object.values(platformsMap),tags,activities: activities.map(({