@xuda.io/account_module 1.2.140 → 1.2.142
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.js +17 -16
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -92,13 +92,13 @@ exports.update_account_info = async function (req) {
|
|
|
92
92
|
delete account_obj.account_info.client_id;
|
|
93
93
|
delete account_obj.account_info.uid;
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
if (!account_obj.account_project_id) {
|
|
96
|
+
const app_module = require(`${module_path}/app_module`);
|
|
97
|
+
const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true } });
|
|
98
|
+
if (ret.code > -1) {
|
|
99
|
+
account_obj.account_project_id = ret.data;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
102
|
|
|
103
103
|
const ret2 = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
104
104
|
if (ret2.code > 0) {
|
|
@@ -407,6 +407,7 @@ exports.get_account_data = async function (req) {
|
|
|
407
407
|
support_plan_changed: acc_obj.support_plan_changed,
|
|
408
408
|
storage_plan: acc_obj.storage_plan,
|
|
409
409
|
storage_plan_changed: acc_obj.storage_plan_changed,
|
|
410
|
+
account_project_id:acc_obj.account_project_id
|
|
410
411
|
|
|
411
412
|
prices_info: acc_obj.prices_info,
|
|
412
413
|
activity_usage: acc_obj.activity_usage,
|
|
@@ -444,15 +445,15 @@ exports.get_account_data = async function (req) {
|
|
|
444
445
|
// }
|
|
445
446
|
// }
|
|
446
447
|
|
|
447
|
-
if (!acc_obj.account_project_id && req.token_ret) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
448
|
+
// if (!acc_obj.account_project_id && req.token_ret) {
|
|
449
|
+
// let = account_obj = acc_obj;
|
|
450
|
+
// const app_module = require(`${module_path}/app_module`);
|
|
451
|
+
// const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true } });
|
|
452
|
+
// if (ret.code > -1) {
|
|
453
|
+
// account_obj.account_project_id = ret.data;
|
|
454
|
+
// const ret2 = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
455
|
+
// }
|
|
456
|
+
// }
|
|
456
457
|
|
|
457
458
|
return ret;
|
|
458
459
|
} catch (error) {
|