@xuda.io/account_module 1.2.2190 → 1.2.2192

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 +3 -1
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -561,6 +561,8 @@ export const get_active_account_profile_info = async function (uid, profile_id)
561
561
  try {
562
562
  const acc_obj = await db_module.get_couch_doc_native('xuda_accounts', uid);
563
563
 
564
+ if (!acc_obj.account_project_id) throw new Error(`acc ${acc_obj._id} has no account_project_id`);
565
+
564
566
  let active_account_profile_id = profile_id || acc_obj.account_info.active_account_profile_id;
565
567
 
566
568
  const account_profile_obj = await db_module.get_app_couch_doc_native(acc_obj.account_project_id, active_account_profile_id);
@@ -1692,7 +1694,7 @@ const get_prices = function (uid, item) {
1692
1694
  };
1693
1695
 
1694
1696
  export const create_account_oauth_link = async function (req, job_id) {
1695
- const link = `https://accounts.google.com/o/oauth2/v2/auth?scope=https://mail.google.com/&access_type=offline&include_granted_scopes=true&response_type=code&state=${req.uid}&redirect_uri=https://${_conf.is_debug ? 'dev.' : ''}xuda.io/oauth&client_id=${
1697
+ const link = `https://accounts.google.com/o/oauth2/v2/auth?scope=https://mail.google.com/&access_type=offline&include_granted_scopes=true&response_type=code&state=${req.uid}&redirect_uri=https://${_conf.is_debug ? 'dev.' : ''}xuda.ai/oauth&client_id=${
1696
1698
  _conf.gmail.clientId
1697
1699
  }&prompt=select_account consent`;
1698
1700
  // await jobs_module.update_job(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2190",
3
+ "version": "1.2.2192",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {