diff --git a/packages/api/src/crm/company/sync/sync.service.ts b/packages/api/src/crm/company/sync/sync.service.ts index a759fdd49..9a188b8a9 100644 --- a/packages/api/src/crm/company/sync/sync.service.ts +++ b/packages/api/src/crm/company/sync/sync.service.ts @@ -181,7 +181,7 @@ export class SyncService implements OnModuleInit { let companies_results: CrmCompany[] = []; for (let i = 0; i < companies.length; i++) { const company = companies[i]; - const originId = company.remote_id[i]; + const originId = company.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/crm/engagement/sync/sync.service.ts b/packages/api/src/crm/engagement/sync/sync.service.ts index 6e5efb2c7..48616e1a5 100644 --- a/packages/api/src/crm/engagement/sync/sync.service.ts +++ b/packages/api/src/crm/engagement/sync/sync.service.ts @@ -186,7 +186,7 @@ export class SyncService implements OnModuleInit { let engagements_results: CrmEngagement[] = []; for (let i = 0; i < engagements.length; i++) { const engagement = engagements[i]; - const originId = engagement.remote_id[i]; + const originId = engagement.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/crm/note/sync/sync.service.ts b/packages/api/src/crm/note/sync/sync.service.ts index bd760cbd0..29e200120 100644 --- a/packages/api/src/crm/note/sync/sync.service.ts +++ b/packages/api/src/crm/note/sync/sync.service.ts @@ -178,7 +178,7 @@ export class SyncService implements OnModuleInit { let notes_results: CrmNote[] = []; for (let i = 0; i < notes.length; i++) { const note = notes[i]; - const originId = note.remote_id[i]; + const originId = note.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/crm/stage/sync/sync.service.ts b/packages/api/src/crm/stage/sync/sync.service.ts index d9a1b2831..55742b4c1 100644 --- a/packages/api/src/crm/stage/sync/sync.service.ts +++ b/packages/api/src/crm/stage/sync/sync.service.ts @@ -196,7 +196,7 @@ export class SyncService implements OnModuleInit { let stages_results: CrmStage[] = []; for (let i = 0; i < stages.length; i++) { const stage = stages[i]; - const originId = stage.remote_id[i]; + const originId = stage.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/crm/task/sync/sync.service.ts b/packages/api/src/crm/task/sync/sync.service.ts index f783b4313..237a952e7 100644 --- a/packages/api/src/crm/task/sync/sync.service.ts +++ b/packages/api/src/crm/task/sync/sync.service.ts @@ -178,7 +178,7 @@ export class SyncService implements OnModuleInit { let tasks_results: CrmTask[] = []; for (let i = 0; i < tasks.length; i++) { const task = tasks[i]; - const originId = task.remote_id[i]; + const originId = task.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/crm/user/sync/sync.service.ts b/packages/api/src/crm/user/sync/sync.service.ts index 731209f03..a27cc2741 100644 --- a/packages/api/src/crm/user/sync/sync.service.ts +++ b/packages/api/src/crm/user/sync/sync.service.ts @@ -177,7 +177,7 @@ export class SyncService implements OnModuleInit { let users_results: CrmUser[] = []; for (let i = 0; i < users.length; i++) { const user = users[i]; - const originId = user.id[i]; + const originId = user.id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/account/sync/sync.service.ts b/packages/api/src/ticketing/account/sync/sync.service.ts index 8b2fe9181..173d21b4c 100644 --- a/packages/api/src/ticketing/account/sync/sync.service.ts +++ b/packages/api/src/ticketing/account/sync/sync.service.ts @@ -176,7 +176,7 @@ export class SyncService implements OnModuleInit { let accounts_results: TicketingAccount[] = []; for (let i = 0; i < accounts.length; i++) { const account = accounts[i]; - const originId = account.id[i]; + const originId = account.id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/comment/sync/sync.service.ts b/packages/api/src/ticketing/comment/sync/sync.service.ts index 04053f5a3..696f28f8f 100644 --- a/packages/api/src/ticketing/comment/sync/sync.service.ts +++ b/packages/api/src/ticketing/comment/sync/sync.service.ts @@ -188,7 +188,7 @@ export class SyncService implements OnModuleInit { let comments_results: TicketingComment[] = []; for (let i = 0; i < comments.length; i++) { const comment = comments[i]; - const originId = comment.remote_id[i]; + const originId = comment.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/contact/sync/sync.service.ts b/packages/api/src/ticketing/contact/sync/sync.service.ts index cf2b1552e..46b3492b3 100644 --- a/packages/api/src/ticketing/contact/sync/sync.service.ts +++ b/packages/api/src/ticketing/contact/sync/sync.service.ts @@ -192,7 +192,7 @@ export class SyncService implements OnModuleInit { let contacts_results: TicketingContact[] = []; for (let i = 0; i < contacts.length; i++) { const contact = contacts[i]; - const originId = contact.remote_id[i]; + const originId = contact.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/tag/sync/sync.service.ts b/packages/api/src/ticketing/tag/sync/sync.service.ts index 2cc48063f..853d2692d 100644 --- a/packages/api/src/ticketing/tag/sync/sync.service.ts +++ b/packages/api/src/ticketing/tag/sync/sync.service.ts @@ -192,7 +192,7 @@ export class SyncService implements OnModuleInit { let tags_results: TicketingTag[] = []; for (let i = 0; i < tags.length; i++) { const tag = tags[i]; - const originId = tag.remote_id[i]; + const originId = tag.remote_id; if (!originId || originId == '') { return; diff --git a/packages/api/src/ticketing/team/sync/sync.service.ts b/packages/api/src/ticketing/team/sync/sync.service.ts index 650ac1a21..8631dc869 100644 --- a/packages/api/src/ticketing/team/sync/sync.service.ts +++ b/packages/api/src/ticketing/team/sync/sync.service.ts @@ -178,7 +178,7 @@ export class SyncService implements OnModuleInit { let teams_results: TicketingTeam[] = []; for (let i = 0; i < teams.length; i++) { const team = teams[i]; - const originId = team.id[i]; + const originId = team.id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/ticket/sync/sync.service.ts b/packages/api/src/ticketing/ticket/sync/sync.service.ts index 1b3240c26..acc3fb9e7 100644 --- a/packages/api/src/ticketing/ticket/sync/sync.service.ts +++ b/packages/api/src/ticketing/ticket/sync/sync.service.ts @@ -176,7 +176,7 @@ export class SyncService implements OnModuleInit { let tickets_results: TicketingTicket[] = []; for (let i = 0; i < tickets.length; i++) { const ticket = tickets[i]; - const originId = ticket.remote_id[i]; + const originId = ticket.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`); diff --git a/packages/api/src/ticketing/user/sync/sync.service.ts b/packages/api/src/ticketing/user/sync/sync.service.ts index 0e81ef1ef..a9a305ada 100644 --- a/packages/api/src/ticketing/user/sync/sync.service.ts +++ b/packages/api/src/ticketing/user/sync/sync.service.ts @@ -176,7 +176,7 @@ export class SyncService implements OnModuleInit { let users_results: TicketingUser[] = []; for (let i = 0; i < users.length; i++) { const user = users[i]; - const originId = user.remote_id[i]; + const originId = user.remote_id; if (!originId || originId == '') { throw new NotFoundError(`Origin id not there, found ${originId}`);