@xuda.io/account_module 1.2.323 → 1.2.325
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 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -58,6 +58,10 @@ export const update_account_info = async function (req, job_id, headers) {
|
|
|
58
58
|
|
|
59
59
|
account_obj.account_info[key] = val;
|
|
60
60
|
|
|
61
|
+
if (key === 'profile_picture') {
|
|
62
|
+
account_obj.account_info['profile_avatar'] = '';
|
|
63
|
+
}
|
|
64
|
+
|
|
61
65
|
if (account_obj.account_info.account_type === 'business') {
|
|
62
66
|
if (key === 'company_name' && validate_input(val, 150, true, false) < 0) {
|
|
63
67
|
error[key] = 'Invalid company';
|
|
@@ -1268,8 +1272,8 @@ export const add_contact = async function (req, job_id, headers) {
|
|
|
1268
1272
|
};
|
|
1269
1273
|
const ret = await db_module.save_couch_doc('xuda_contacts', doc);
|
|
1270
1274
|
|
|
1271
|
-
const app_id = await get_account_default_project_id(uid);
|
|
1272
1275
|
if (!profile_avatar) {
|
|
1276
|
+
const app_id = await get_account_default_project_id(uid);
|
|
1273
1277
|
const ai_module = await import(`${module_path}/ai_module/index.mjs`);
|
|
1274
1278
|
ai_module.update_thumbnail('contact', doc, app_id, uid, job_id, headers, 'xuda_contacts');
|
|
1275
1279
|
}
|