@xuda.io/account_module 1.2.29 → 1.2.31

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 +20 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -705,12 +705,12 @@ exports.validate_user_plan = async function (req) {
705
705
  // }
706
706
  // }
707
707
 
708
- if (app_obj.app_type === "backup" && ret.data.plan === "free") {
709
- return {
710
- code: -10,
711
- data: `The free plan does not include the ability to perform backups. To access backup capabilities, please consider upgrading your plan. You can do so by visiting https://xuda.io/dashboard/settings/billing.`,
712
- };
713
- }
708
+ // if (app_obj.app_type === "backup" && ret.data.plan === "free") {
709
+ // return {
710
+ // code: -10,
711
+ // data: `The free plan does not include the ability to perform backups. To access backup capabilities, please consider upgrading your plan. You can do so by visiting https://xuda.io/dashboard/settings/billing.`,
712
+ // };
713
+ // }
714
714
 
715
715
  return { code: 1, data: ret.data };
716
716
  };
@@ -1439,3 +1439,17 @@ exports.invite_user = async function (req) {
1439
1439
 
1440
1440
  // return { code: -1, data: "contact already exist active or deleted" };
1441
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.29",
3
+ "version": "1.2.31",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {