@xuda.io/account_module 1.2.1248 → 1.2.1249
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 +6 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -483,6 +483,11 @@ export const get_account_data = async function (req) {
|
|
|
483
483
|
try {
|
|
484
484
|
const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
485
485
|
|
|
486
|
+
let _design;
|
|
487
|
+
if (acc_obj.account_project_id) {
|
|
488
|
+
_design = await db_module.get_app_couch_doc_native(acc_obj.account_project_id, '_design/xuda');
|
|
489
|
+
}
|
|
490
|
+
|
|
486
491
|
var ret = { code: 1 };
|
|
487
492
|
ret.data = {
|
|
488
493
|
_id: acc_obj._id,
|
|
@@ -496,7 +501,7 @@ export const get_account_data = async function (req) {
|
|
|
496
501
|
ai_workspace_plan: acc_obj.ai_workspace_plan,
|
|
497
502
|
storage_plan_changed: acc_obj.storage_plan_changed,
|
|
498
503
|
account_project_id: acc_obj.account_project_id,
|
|
499
|
-
is_boarded: acc_obj.account_profile_id && acc_obj.account_project_id && acc_obj.ai_workspace_plan ? true : false, //acc_obj.isBoarded,
|
|
504
|
+
is_boarded: acc_obj.account_profile_id && acc_obj.account_project_id && acc_obj.ai_workspace_plan && _design.views.ai_chat_usage ? true : false, //acc_obj.isBoarded,
|
|
500
505
|
|
|
501
506
|
prices_info: acc_obj.prices_info,
|
|
502
507
|
activity_usage: acc_obj.activity_usage,
|