@xuda.io/account_module 1.2.1806 → 1.2.1807
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 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2038,7 +2038,7 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
|
|
|
2038
2038
|
}
|
|
2039
2039
|
|
|
2040
2040
|
const { bio, country, mainCategory, subCategory } = account_info;
|
|
2041
|
-
|
|
2041
|
+
|
|
2042
2042
|
const file_ret = await ai_module.get_profile_avatar(account_info.profile_picture, uid, '', account_profile_info, account_info.account_type, 'account', account_uid, { bio, country, mainCategory, subCategory }, business_size, name, account_info.email, job_id, headers);
|
|
2043
2043
|
if (file_ret.code < 0) {
|
|
2044
2044
|
throw new Error(file_ret.data);
|
|
@@ -2329,6 +2329,8 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2329
2329
|
throw new Error(file_ret.data);
|
|
2330
2330
|
}
|
|
2331
2331
|
|
|
2332
|
+
if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
|
|
2333
|
+
|
|
2332
2334
|
let { code: contact_code, data: contact_obj2 } = await db_module.get_app_couch_doc(account_profile_info.app_id, contact_id);
|
|
2333
2335
|
contact_obj = contact_obj2;
|
|
2334
2336
|
contact_obj.profile_picture_obj = file_ret.data;
|
|
@@ -2357,7 +2359,7 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2357
2359
|
}
|
|
2358
2360
|
|
|
2359
2361
|
let file_ret = { code: 1, data: cache };
|
|
2360
|
-
|
|
2362
|
+
debugger;
|
|
2361
2363
|
if (!cache) {
|
|
2362
2364
|
file_ret = await ai_module.get_profile_avatar(
|
|
2363
2365
|
contact_obj.profile_picture,
|
|
@@ -2410,6 +2412,8 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2410
2412
|
throw new Error(file_ret.data);
|
|
2411
2413
|
}
|
|
2412
2414
|
|
|
2415
|
+
if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
|
|
2416
|
+
|
|
2413
2417
|
let { code: contact_code, data: contact_obj3 } = await db_module.get_app_couch_doc(account_profile_info.app_id, contact_id);
|
|
2414
2418
|
contact_obj = contact_obj3;
|
|
2415
2419
|
contact_obj.profile_avatar_obj = file_ret.data;
|