@xuda.io/account_module 1.2.158 → 1.2.160

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 +11 -3
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -504,8 +504,7 @@ export const get_account_instances = async function (req) {
504
504
  };
505
505
 
506
506
  export const get_account_info = async function (req) {
507
- debugger;
508
- return await this.get_account_data({
507
+ return await get_account_data({
509
508
  uid: req.uid,
510
509
  enforce_usage: req.enforce_usage,
511
510
  });
@@ -655,7 +654,7 @@ export const get_cpu = async function (req) {
655
654
  const { app_obj } = req;
656
655
  var cpu = 1;
657
656
  if (app_obj.app_hosting) {
658
- const hosting_plan = this.get_hosting_plan({
657
+ const hosting_plan = get_hosting_plan({
659
658
  app_obj,
660
659
  });
661
660
 
@@ -1414,6 +1413,15 @@ export const create_account_oauth_link = async function (req, job_id) {
1414
1413
  };
1415
1414
  };
1416
1415
 
1416
+ export const get_account_default_project_obj = async function (uid) {
1417
+ const { data: account_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
1418
+ return account_obj.account_project_id;
1419
+ };
1420
+ export const get_account_default_project_id = async function (uid) {
1421
+ const account_obj = await get_account_object(uid);
1422
+ return account_obj.account_project_id;
1423
+ };
1424
+
1417
1425
  // setTimeout(async () => {
1418
1426
  // const uid = "0489f946c213947316647b468f029ed9"; //"aecc740881fd0a35098c738652000fab";
1419
1427
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.158",
3
+ "version": "1.2.160",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {