Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Feature/refactor import service (#4599)
Thomas Kaul7fb0f9b6e8da
diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.tsindex babe7c3e38..b6fe0d949b 100644--- a/apps/api/src/app/import/import.service.ts+++ b/apps/api/src/app/import/import.service.ts@@ -167,9 +167,9 @@ export class ImportService {for (const account of accountsDto) {// Check if there is any existing account with the same ID- const accountWithSameId = existingAccounts.find(- (existingAccount) => existingAccount.id === account.id- );+ const accountWithSameId = existingAccounts.find((existingAccount) => {+ return existingAccount.id === account.id;+ });// If there is no account or if the account belongs to a different user then create a new accountif (!accountWithSameId || accountWithSameId.userId !== user.id) {