@xuda.io/account_module 1.2.1419 → 1.2.1420
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 +11 -12
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -2165,15 +2165,15 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2165
2165
|
|
|
2166
2166
|
let { code: contact_code, data: contact_obj } = await db_module.get_app_couch_doc(account_profile_info.app_id, contact_id);
|
|
2167
2167
|
|
|
2168
|
-
|
|
2168
|
+
contact_obj.profile_picture_obj = file_ret.data;
|
|
2169
2169
|
|
|
2170
|
-
|
|
2171
|
-
|
|
2170
|
+
contact_obj.profile_picture = contact_obj.profile_picture_obj.file_url;
|
|
2171
|
+
contact_obj.profile_picture_source = file_ret.profile_picture_source;
|
|
2172
2172
|
const contact_save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, contact_obj);
|
|
2173
|
-
profile_picture =
|
|
2173
|
+
profile_picture = contact_obj.profile_picture;
|
|
2174
2174
|
}
|
|
2175
2175
|
|
|
2176
|
-
if (!
|
|
2176
|
+
if (!contact_obj.profile_avatar) {
|
|
2177
2177
|
let business_size;
|
|
2178
2178
|
|
|
2179
2179
|
switch (account_obj.membership_plan) {
|
|
@@ -2208,16 +2208,15 @@ const set_contact_profile_picture = async function (uid, contact_id, metadata, j
|
|
|
2208
2208
|
break;
|
|
2209
2209
|
}
|
|
2210
2210
|
|
|
2211
|
-
const name = account_info.account_type === 'business' ? account_info.business_name : account_info.full_name;
|
|
2212
|
-
const { bio, country, mainCategory, subCategory } = account_info;
|
|
2211
|
+
// const name = account_info.account_type === 'business' ? account_info.business_name : account_info.full_name;
|
|
2212
|
+
// const { bio, country, mainCategory, subCategory } = account_info;
|
|
2213
2213
|
|
|
2214
|
-
const file_ret = await ai_module.get_profile_avatar(profile_picture, uid, '', account_profile_info,
|
|
2214
|
+
const file_ret = await ai_module.get_profile_avatar(profile_picture, uid, '', account_profile_info, contact_obj.account_type, 'contact', contact_id, { bio, country, mainCategory, subCategory }, business_size, contact_obj.name, contact_obj.email, job_id, headers);
|
|
2215
2215
|
|
|
2216
|
-
let { code:
|
|
2217
|
-
let account_info = account_obj.account_info;
|
|
2216
|
+
let { code: contact_code, data: contact_obj } = await db_module.get_couch_doc('xuda_accounts', account_uid);
|
|
2218
2217
|
|
|
2219
|
-
|
|
2220
|
-
|
|
2218
|
+
contact_obj.profile_avatar_obj = file_ret;
|
|
2219
|
+
contact_obj.profile_avatar = contact_obj.profile_avatar_obj.file_url;
|
|
2221
2220
|
|
|
2222
2221
|
const contact_save_ret = await db_module.save_app_couch_doc(account_profile_info.app_id, contact_obj);
|
|
2223
2222
|
await update_contact_profile_picture_status(uid, contact_id, 3);
|