From 866dcadc9549542db60b08ba459c2cca9f8b68b8 Mon Sep 17 00:00:00 2001 From: nael Date: Mon, 30 Oct 2023 23:32:27 +0100 Subject: [PATCH] feat: add contributing md --- .../api/src/crm/contact/services/contact.service.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/api/src/crm/contact/services/contact.service.ts b/packages/api/src/crm/contact/services/contact.service.ts index 095d2276b..c0edf056a 100644 --- a/packages/api/src/crm/contact/services/contact.service.ts +++ b/packages/api/src/crm/contact/services/contact.service.ts @@ -20,9 +20,15 @@ export class ContactService { async addContact(createContactDto: CreateContactDto, integrationId: string) { //TODO: add createContact info body to DB => addToDbBackup() + // 1. insert job_db => status: INITIALIZED uuid_job + // uuid_job + // 2. insert inside crm_contact DB uuid_job + // uuid_contact + // update job_db => status: WRITTEN + //TODO: get the destination provider => call destinationCRMInDb() const dest = {}; - let resp; + let resp; //{data: {freshsales rep}, code: }; switch (dest) { case 'freshsales': resp = await this.freshsales.addContact(); @@ -48,6 +54,8 @@ export class ContactService { break; } //TODO: sanitize the resp to normalize it + + //3. update job_db => status: SUCCESS/FAIL return resp; } }