Auth Fetch Update in Client Register

This commit is contained in:
=bhagwanSingh 2025-12-17 14:20:15 +05:30
parent efa6ce929e
commit b9f2eb10b4
1 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import axios from "axios";
import logger from "../config/logger.js";
import authFetch from "../utils/authFetch.js";
class SalesforceService {
@ -12,10 +13,12 @@ class SalesforceService {
logger.info(`SalesforceService - Sending client data to Salesforce: ${clientData.userDetails.email}`);
const response = await axios.post(url, salesforcePayload, {
const response = await authFetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(salesforcePayload),
timeout: 30000, // 30 seconds timeout
});