@xuda.io/account_module 1.2.140 → 1.2.141
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 +16 -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) {
|
|
@@ -444,15 +444,15 @@ exports.get_account_data = async function (req) {
|
|
|
444
444
|
// }
|
|
445
445
|
// }
|
|
446
446
|
|
|
447
|
-
if (!acc_obj.account_project_id && req.token_ret) {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
}
|
|
447
|
+
// if (!acc_obj.account_project_id && req.token_ret) {
|
|
448
|
+
// let = account_obj = acc_obj;
|
|
449
|
+
// const app_module = require(`${module_path}/app_module`);
|
|
450
|
+
// const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true } });
|
|
451
|
+
// if (ret.code > -1) {
|
|
452
|
+
// account_obj.account_project_id = ret.data;
|
|
453
|
+
// const ret2 = await db_module.save_couch_doc('xuda_accounts', account_obj);
|
|
454
|
+
// }
|
|
455
|
+
// }
|
|
456
456
|
|
|
457
457
|
return ret;
|
|
458
458
|
} catch (error) {
|