@xuda.io/account_module 1.2.1810 → 1.2.1811
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +6 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2391,6 +2391,12 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2391
2391
|
headers,
|
|
2392
2392
|
);
|
|
2393
2393
|
|
|
2394
|
+
if (file_ret.code < 0) {
|
|
2395
|
+
throw new Error(file_ret.data);
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
|
|
2399
|
+
|
|
2394
2400
|
if (contact_obj?.account_type === 'business') {
|
|
2395
2401
|
if (contact_obj?.business_has_person && contact_obj?.person_info?.person_full_name !== 'Not available') {
|
|
2396
2402
|
cache = await save_xuda_cache(uid, 'profile_avatar', contact_obj.email, file_ret.data, { account_type: contact_obj.account_type, type: 'contact' });
|
|
@@ -2412,11 +2418,6 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2412
2418
|
// }
|
|
2413
2419
|
// save_xuda_cache(uid, 'profile_avatar', contact_obj.email, file_ret.data, { account_type: contact_obj.account_type, type: 'contact' });
|
|
2414
2420
|
}
|
|
2415
|
-
if (file_ret.code < 0) {
|
|
2416
|
-
throw new Error(file_ret.data);
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
|
|
2420
2421
|
|
|
2421
2422
|
let { code: contact_code, data: contact_obj3 } = await db_module.get_app_couch_doc(account_profile_info.app_id, contact_id);
|
|
2422
2423
|
contact_obj = contact_obj3;
|