@xuda.io/account_module 1.2.1310 → 1.2.1311
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.mjs +28 -28
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1998,40 +1998,40 @@ export const onboarding_completed = async function (req, job_id, headers) {
|
|
|
1998
1998
|
throw new Error(`missing profile_avatar`);
|
|
1999
1999
|
}
|
|
2000
2000
|
|
|
2001
|
-
if (!account_doc.account_project_id) {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
}
|
|
2001
|
+
// if (!account_doc.account_project_id) {
|
|
2002
|
+
// const app_module = await import(`${module_path}/app_module/index.mjs`);
|
|
2003
|
+
|
|
2004
|
+
// const ret = await app_module.create_project({ token_ret: req.token_ret, uid, data: { app_name: `Account ${uid} main project`, is_account_project: true, app_plugins_purchased: [' @xuda.io/xuda-dbs-plugin-xuda', '@xuda.io/xuda-framework-plugin-tailwind'] } }, job_id, headers);
|
|
2005
|
+
// if (ret.code > -1) {
|
|
2006
|
+
// account_doc.account_project_id = ret.data;
|
|
2007
|
+
// const drive_module = await import(`${module_path}/drive_module/index.mjs`);
|
|
2008
|
+
// let drive_req = { app_id: account_doc.account_project_id, uid, path: '/' };
|
|
2009
|
+
// await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Profile Images', is_system: true } }, job_id, headers);
|
|
2010
|
+
// await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Thumbnails', is_system: true } }, job_id, headers);
|
|
2011
|
+
// await drive_module.create_drive_folder_user({ ...drive_req, ...{ folder_name: 'Chat Attachments', is_system: true } }, job_id, headers);
|
|
2012
|
+
// }
|
|
2013
|
+
// }
|
|
2014
2014
|
|
|
2015
2015
|
account_doc.account_info.full_name = `${account_doc.account_info.first_name} ${account_doc.account_info.last_name}`;
|
|
2016
2016
|
|
|
2017
|
-
if (!account_doc.ai_workspace_plan) {
|
|
2018
|
-
|
|
2019
|
-
}
|
|
2017
|
+
// if (!account_doc.ai_workspace_plan) {
|
|
2018
|
+
// account_doc.ai_workspace_plan = 'free_ai_workspace';
|
|
2019
|
+
// }
|
|
2020
2020
|
|
|
2021
2021
|
//// validate account_profile_id
|
|
2022
2022
|
|
|
2023
|
-
if (!account_doc.account_profile_id) {
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
} else {
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
}
|
|
2023
|
+
// if (!account_doc.account_profile_id) {
|
|
2024
|
+
// const account_profile_ret = await create_account_profile({ uid, profile_name: account_doc.account_info.full_name, main: true });
|
|
2025
|
+
// account_doc.account_profile_id = account_profile_ret.data.id;
|
|
2026
|
+
// account_doc.account_info.active_account_profile_id = account_doc.account_profile_id;
|
|
2027
|
+
// } else {
|
|
2028
|
+
// let account_profile_ret = await db_module.get_app_couch_doc(account_doc.account_project_id, account_doc.account_profile_id);
|
|
2029
|
+
// if (account_profile_ret.code < 0) {
|
|
2030
|
+
// const account_profile_ret = await create_account_profile({ uid, profile_name: account_doc.account_info.full_name, main: true });
|
|
2031
|
+
// account_doc.account_profile_id = account_profile_ret.data.id;
|
|
2032
|
+
// account_doc.account_info.active_account_profile_id = account_doc.account_profile_id;
|
|
2033
|
+
// }
|
|
2034
|
+
// }
|
|
2035
2035
|
account_doc.boarded_info = { headers, date_ts: Date.now() };
|
|
2036
2036
|
account_doc.isBoarded = true;
|
|
2037
2037
|
const save_ret = await db_module.save_couch_doc('xuda_accounts', account_doc);
|