@xuda.io/account_module 1.2.164 → 1.2.166

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 +12 -8
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -498,7 +498,7 @@ export const get_account_info = async function (req) {
498
498
  };
499
499
 
500
500
  export const get_account_name = async function (req) {
501
- const data = await db_module.get_couch_doc('xuda_accounts', req.uid_query);
501
+ const data = await db_module.get_couch_doc('xuda_accounts', req.uid_query || req.uid);
502
502
  if (data.code < 0) {
503
503
  return data;
504
504
  }
@@ -510,14 +510,18 @@ export const get_account_name = async function (req) {
510
510
  profile_picture: '',
511
511
  username: '',
512
512
  };
513
- if (data.data.account_info) {
513
+ if ((data.data.account_info, email, phone, profile_picture, username)) {
514
+ const { first_name, last_name, website, country, bio } = data.data.account_info;
514
515
  obj = {
515
- first_name: data.data.account_info.first_name,
516
- last_name: data.data.account_info.last_name,
517
- email: data.data.account_info.email,
518
- phone: data.data.account_info.tel,
519
- profile_picture: data.data.account_info.profile_picture,
520
- username: data.data.account_info.username,
516
+ first_name,
517
+ last_name,
518
+ email,
519
+ phone,
520
+ profile_picture,
521
+ username,
522
+ website,
523
+ country,
524
+ bio,
521
525
  };
522
526
  }
523
527
  return { code: 1, data: obj };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.164",
3
+ "version": "1.2.166",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {