@xuda.io/account_module 1.2.2140 → 1.2.2142

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 +6 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -2346,7 +2346,11 @@ export const get_contacts = async function (req, job_id, headers) {
2346
2346
 
2347
2347
  let counts = {};
2348
2348
  for (const val of counts_ret?.rows) {
2349
- counts[val.key[1]] = val.value;
2349
+ if (!counts[val.key[1]]) {
2350
+ counts[val.key[1]] = 0;
2351
+ }
2352
+
2353
+ counts[val.key[1]] += val.value;
2350
2354
  }
2351
2355
 
2352
2356
  return counts;
@@ -2359,7 +2363,7 @@ export const get_contacts = async function (req, job_id, headers) {
2359
2363
  group_level: 999,
2360
2364
 
2361
2365
  startkey: [uid, '', ''],
2362
- endkey: [uid, '', 'zzzzzz'],
2366
+ endkey: [uid, 'zzzzzz', 'zzzzzz'],
2363
2367
  });
2364
2368
 
2365
2369
  let counts = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/account_module",
3
- "version": "1.2.2140",
3
+ "version": "1.2.2142",
4
4
  "description": "Xuda Account Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {