@xuda.io/account_module 1.2.1319 → 1.2.1321
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 +5 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1090,9 +1090,9 @@ export const read_emails = async function (req, job_id, headers) {
|
|
|
1090
1090
|
|
|
1091
1091
|
export const get_email_accounts = async function (req) {
|
|
1092
1092
|
const { uid, stat } = req;
|
|
1093
|
-
|
|
1093
|
+
const app_id = await get_account_default_project_id(uid);
|
|
1094
1094
|
const db_module = await import(`${module_path}/db_module/index.mjs`);
|
|
1095
|
-
var email_account_ret = await db_module.
|
|
1095
|
+
var email_account_ret = await db_module.find_app_couch_query(app_id, {
|
|
1096
1096
|
selector: {
|
|
1097
1097
|
docType: 'email_account',
|
|
1098
1098
|
uid,
|
|
@@ -1778,7 +1778,9 @@ const get_prices = function (uid, item) {
|
|
|
1778
1778
|
};
|
|
1779
1779
|
|
|
1780
1780
|
export const create_account_oauth_link = async function (req, job_id) {
|
|
1781
|
-
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=${
|
|
1781
|
+
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=${
|
|
1782
|
+
_conf.gmail.clientId
|
|
1783
|
+
}&prompt=select_account consent`;
|
|
1782
1784
|
// await jobs_module.update_job(
|
|
1783
1785
|
// {
|
|
1784
1786
|
// job_id,
|