@xuda.io/account_module 1.2.1327 → 1.2.1329
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 +1 -20
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -990,25 +990,6 @@ export const search_users = async function (req) {
|
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
|
|
993
|
-
const generate_gmail_access_token = async function (email_account) {
|
|
994
|
-
return new Promise((resolve, reject) => {
|
|
995
|
-
fetch('https://oauth2.googleapis.com/token', {
|
|
996
|
-
method: 'POST',
|
|
997
|
-
headers: { 'Content-Type': 'application/json' },
|
|
998
|
-
body: JSON.stringify({
|
|
999
|
-
refresh_token: email_account.authorization_data.refresh_token,
|
|
1000
|
-
client_id: _conf.gmail.clientId,
|
|
1001
|
-
client_secret: _conf.gmail.clientSecret,
|
|
1002
|
-
grant_type: 'refresh_token',
|
|
1003
|
-
}),
|
|
1004
|
-
})
|
|
1005
|
-
.then((response) => response.json())
|
|
1006
|
-
.then((data) => {
|
|
1007
|
-
resolve(data);
|
|
1008
|
-
});
|
|
1009
|
-
});
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
993
|
export const find_contact_duplicates = async function (req) {
|
|
1013
994
|
const { uid, name } = req;
|
|
1014
995
|
var opt = {
|
|
@@ -2040,7 +2021,7 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
2040
2021
|
is_spam,
|
|
2041
2022
|
profile_avatar,
|
|
2042
2023
|
profile_avatar_obj,
|
|
2043
|
-
account_profiles: [account_profile_obj],
|
|
2024
|
+
account_profiles: [account_profile_obj._id],
|
|
2044
2025
|
};
|
|
2045
2026
|
const ret = await save_contact(uid, doc);
|
|
2046
2027
|
|