@xuda.io/account_module 1.2.827 → 1.2.829

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 +9 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -149,8 +149,9 @@ export const update_account_info = async function (req, job_id, headers) {
149
149
  if (!change) {
150
150
  return { code: 1300, data: 'no change' };
151
151
  }
152
-
153
- account_obj.account_info.full_name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
152
+ if (!account_obj.account_info.full_name) {
153
+ account_obj.account_info.full_name = `${account_obj.account_info.first_name} ${account_obj.account_info.last_name}`;
154
+ }
154
155
 
155
156
  if (account_info_changes_arr.includes('profile_picture') || account_info_changes_arr.includes('profile_avatar_stat')) {
156
157
  account_obj.account_info['profile_avatar'] = '';
@@ -883,15 +884,15 @@ export const search_users = async function (req) {
883
884
  ...selector,
884
885
  $or: [
885
886
  {
886
- 'account_info.first_name': {
887
- $regex: `(?i)${search}`,
888
- },
889
- },
890
- {
891
- 'account_info.last_name': {
887
+ 'account_info.full_name': {
892
888
  $regex: `(?i)${search}`,
893
889
  },
894
890
  },
891
+ // {
892
+ // 'account_info.last_name': {
893
+ // $regex: `(?i)${search}`,
894
+ // },
895
+ // },
895
896
  {
896
897
  'account_info.business_name': {
897
898
  $regex: `(?i)${search}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.827",
3
+ "version": "1.2.829",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {