@xuda.io/account_module 1.2.28 → 1.2.30

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.js +14 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -756,8 +756,6 @@ const get_account_log_object = function (
756
756
  headers,
757
757
  security
758
758
  ) {
759
- var uid = body.uid;
760
-
761
759
  return {
762
760
  uid: body.uid,
763
761
  ip,
@@ -1441,3 +1439,17 @@ exports.invite_user = async function (req) {
1441
1439
 
1442
1440
  // return { code: -1, data: "contact already exist active or deleted" };
1443
1441
  };
1442
+
1443
+ exports.get_account_rt_info = async function (uid) {
1444
+ const doc_ret = await db_module.get_couch_doc("xuda_accounts", uid);
1445
+ if (doc_ret.code < 0) {
1446
+ console.error("get_account_rt_info", doc_ret);
1447
+ return {};
1448
+ }
1449
+ var account_info = doc_ret.data.account_info;
1450
+
1451
+ delete account_info.user_id;
1452
+
1453
+ account_info.uid = doc_ret.data._id;
1454
+ return account_info;
1455
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.28",
3
+ "version": "1.2.30",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {