Update ArpaWebservice.js
This commit is contained in:
@@ -129,7 +129,7 @@ module.exports.saveUserToArpa = (userData, db) => {
|
||||
BusinessCategoryId: BusinessCategoryId(db),
|
||||
CheckExistNationalCode: true
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const ArpaID = await axios.get('/api/postBusiness', { ...axiosConfig(db), params: { ...data } })
|
||||
@@ -140,6 +140,8 @@ module.exports.saveUserToArpa = (userData, db) => {
|
||||
businessCode: ArpaID.data.data.BusinessCode
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
reject(e)
|
||||
}
|
||||
})
|
||||
@@ -162,13 +164,15 @@ module.exports.updateUserOnArpa = (userData, arpa_businessID, db) => {
|
||||
BusinessID: arpa_businessID,
|
||||
CheckExistNationalCode: true
|
||||
}
|
||||
|
||||
console.log(data)
|
||||
return new Promise(async (resolve, reject) => {
|
||||
try {
|
||||
const ArpaUpdate = await axios.post('/api/putBusiness', data, axiosConfig(db))
|
||||
if (!ArpaUpdate.data.status) reject(new Error('Cant update user -- There is a problem in ArpaWebService'))
|
||||
resolve('updated successfully')
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
|
||||
reject(e)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user