@xuda.io/notification_module 1.1.71 → 1.1.73

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.js +3 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -423,10 +423,11 @@ exports.get_notifications = async function (req) {
423
423
 
424
424
  try {
425
425
  var ret = await db_module.find_couch_query("xuda_notification", opt);
426
- let data = [];
426
+ let data = { docs: [] };
427
427
  if (ret.docs) {
428
428
  for await (let doc of ret.docs) {
429
429
  if (await module.exports.notifications_validation_fx(doc._id)) {
430
+ data.docs.push(doc);
430
431
  }
431
432
  }
432
433
  }
@@ -438,7 +439,7 @@ exports.get_notifications = async function (req) {
438
439
 
439
440
  return {
440
441
  code: 1,
441
- data: ret,
442
+ data,
442
443
  };
443
444
  } catch (e) {
444
445
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/notification_module",
3
- "version": "1.1.71",
3
+ "version": "1.1.73",
4
4
  "description": "Xuda Notification Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {