@xuda.io/account_module 1.2.1535 → 1.2.1538
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 +9 -9
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -24,13 +24,13 @@ const account_info_properties = [
|
|
|
24
24
|
'mainCategory',
|
|
25
25
|
'subCategory',
|
|
26
26
|
'profile_picture',
|
|
27
|
+
'profile_picture_obj',
|
|
27
28
|
'username',
|
|
28
29
|
'website',
|
|
29
|
-
// 'auto_respond',
|
|
30
|
-
// 'auto_respond_mode',
|
|
31
|
-
// 'auto_respond_agents',
|
|
32
30
|
'profile_avatar_stat',
|
|
33
31
|
'active_account_profile_id',
|
|
32
|
+
'profile_avatar',
|
|
33
|
+
'profile_avatar_obj',
|
|
34
34
|
];
|
|
35
35
|
|
|
36
36
|
global._conf = (
|
|
@@ -154,9 +154,9 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
154
154
|
|
|
155
155
|
account_obj.account_info.full_name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
|
|
156
156
|
|
|
157
|
-
if (account_info_changes_arr.includes('profile_picture') || account_info_changes_arr.includes('profile_avatar_stat')) {
|
|
158
|
-
|
|
159
|
-
}
|
|
157
|
+
// if (account_info_changes_arr.includes('profile_picture') || account_info_changes_arr.includes('profile_avatar_stat')) {
|
|
158
|
+
// account_obj.account_info['profile_avatar'] = '';
|
|
159
|
+
// }
|
|
160
160
|
|
|
161
161
|
//clean up received from req
|
|
162
162
|
delete account_obj.account_info.gtp_token;
|
|
@@ -2846,7 +2846,7 @@ export const unarchive_account_profile = async function (req) {
|
|
|
2846
2846
|
};
|
|
2847
2847
|
|
|
2848
2848
|
export const create_account_profile = async function (req, job_id, headers) {
|
|
2849
|
-
const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main,
|
|
2849
|
+
const { uid, profile_name, profile_signature, email_account_id, profile_picture, profile_avatar, profile_picture_obj, profile_avatar_obj, main, account_type } = req;
|
|
2850
2850
|
try {
|
|
2851
2851
|
const app_id = await get_account_default_project_id(uid);
|
|
2852
2852
|
// const { data: acc_obj } = await db_module.get_couch_doc('xuda_accounts', uid);
|
|
@@ -2858,7 +2858,7 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2858
2858
|
date_created_ts: d,
|
|
2859
2859
|
ts: d,
|
|
2860
2860
|
docType: 'account_profile',
|
|
2861
|
-
|
|
2861
|
+
account_type,
|
|
2862
2862
|
uid,
|
|
2863
2863
|
profile_name, //: profile_name || acc_obj.account_info.business_name || acc_obj.account_info.name,
|
|
2864
2864
|
profile_signature,
|
|
@@ -2882,7 +2882,7 @@ export const create_account_profile = async function (req, job_id, headers) {
|
|
|
2882
2882
|
export const update_account_profile = async function (req, job_id, headers) {
|
|
2883
2883
|
const { uid, _id } = req;
|
|
2884
2884
|
const app_id = await get_account_default_project_id(uid);
|
|
2885
|
-
const account_profile_properties = ['profile_name', 'profile_signature', 'email_account_id', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents', '
|
|
2885
|
+
const account_profile_properties = ['profile_name', 'profile_signature', 'email_account_id', 'profile_picture', 'profile_avatar', 'profile_picture_obj', 'profile_avatar_obj', 'auto_respond', 'auto_respond_mode', 'auto_respond_agents', 'account_type'];
|
|
2886
2886
|
try {
|
|
2887
2887
|
let { data: account_profile_doc } = await db_module.get_app_couch_doc(app_id, _id);
|
|
2888
2888
|
|