@xuda.io/account_module 1.2.1402 → 1.2.1404

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.
Files changed (2) hide show
  1. package/index.mjs +10 -10
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1989,15 +1989,14 @@ export const add_contact = async function (req, job_id, headers) {
1989
1989
  if (account_code < 0) {
1990
1990
  throw new Error(`account ${contact_uid} not found`);
1991
1991
  }
1992
- if (!account_info.profile_picture) {
1993
- account_info.profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
1994
- account_info.profile_picture = account_info.profile_picture_obj.file_url;
1995
- // account_info.profile_picture_obj = profile_picture_obj;
1996
- // account_info.profile_picture = profile_picture;
1997
- const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
1998
- }
1999
-
2000
- const { bio, business_name, country, mainCategory, subCategory } = account_info;
1992
+ // if (!account_info.profile_picture) {
1993
+ // account_info.profile_picture_obj = await ai_module.get_profile_picture(uid, account_type, name, { email, context, metadata, account_info }, account_profile_info, job_id, headers);
1994
+ // account_info.profile_picture = account_info.profile_picture_obj.file_url;
1995
+ // // account_info.profile_picture_obj = profile_picture_obj;
1996
+ // // account_info.profile_picture = profile_picture;
1997
+ // const account_save_ret = await db_module.save_couch_doc('xuda_accounts', account_obj);
1998
+ // }
1999
+ set_account_profile_picture(uid, contact_uid);
2001
2000
  } else {
2002
2001
  // contact without use account
2003
2002
 
@@ -2127,8 +2126,9 @@ const set_account_profile_picture = async function (uid, account_uid) {
2127
2126
  }
2128
2127
 
2129
2128
  const name = account_info.account_type === 'business' ? account_info.business_name : account_info.full_name;
2129
+ const { bio, business_name, country, mainCategory, subCategory } = account_info;
2130
2130
 
2131
- const file_ret = await ai_module.get_profile_avatar(profile_picture, uid, '', account_profile_info, account_info.account_type, 'account', account_uid, {}, business_size, name, account_info.email, job_id, headers);
2131
+ const file_ret = await ai_module.get_profile_avatar(profile_picture, uid, '', account_profile_info, account_info.account_type, 'account', account_uid, { bio, country, mainCategory, subCategory }, business_size, name, account_info.email, job_id, headers);
2132
2132
 
2133
2133
  let { code: account_code, data: account_obj } = await db_module.get_couch_doc('xuda_accounts', account_uid);
2134
2134
  let account_info = account_obj.account_info;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.1402",
3
+ "version": "1.2.1404",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {