Browse Source

Refactoring

pull/4599/head
Thomas Kaul 4 months ago
parent
commit
320a9a508e
  1. 6
      apps/api/src/app/import/import.service.ts

6
apps/api/src/app/import/import.service.ts

@ -167,9 +167,9 @@ export class ImportService {
for (const account of accountsDto) { for (const account of accountsDto) {
// Check if there is any existing account with the same ID // Check if there is any existing account with the same ID
const accountWithSameId = existingAccounts.find( const accountWithSameId = existingAccounts.find((existingAccount) => {
(existingAccount) => existingAccount.id === account.id return existingAccount.id === account.id;
); });
// If there is no account or if the account belongs to a different user then create a new account // If there is no account or if the account belongs to a different user then create a new account
if (!accountWithSameId || accountWithSameId.userId !== user.id) { if (!accountWithSameId || accountWithSameId.userId !== user.id) {

Loading…
Cancel
Save