@xuda.io/account_module 1.2.1805 → 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.
Files changed (2) hide show
  1. package/index.mjs +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2046,7 +2046,7 @@ const set_account_profile_picture = async function (uid, account_uid, metadata,
2046
2046
  let { code: account_code, data: account_obj3 } = await db_module.get_couch_doc('xuda_accounts', account_uid);
2047
2047
  account_obj = account_obj3;
2048
2048
  account_info = account_obj.account_info;
2049
- debugger;
2049
+
2050
2050
  if (!_.isObject(file_ret.data)) throw new Error('file_ret not an object');
2051
2051
  account_info.profile_avatar_obj = file_ret.data;
2052
2052
  account_info.profile_avatar = account_info.profile_avatar_obj.file_url;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1805",
3
+ "version": "1.2.1807",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {