@xuda.io/notification_module 1.1.68 → 1.1.70
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.
- package/index.js +8 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -426,9 +426,15 @@ exports.get_notifications = async function (req) {
|
|
|
426
426
|
|
|
427
427
|
if (ret.docs) {
|
|
428
428
|
for await (let doc of ret.docs) {
|
|
429
|
-
await module.exports.notifications_validation_fx(doc._id)
|
|
429
|
+
if (!(await module.exports.notifications_validation_fx(doc._id))) {
|
|
430
|
+
}
|
|
430
431
|
}
|
|
431
432
|
}
|
|
433
|
+
// for await (let [key,doc] of Object.entries(ret.docs)) {
|
|
434
|
+
// if( !await module.exports.notifications_validation_fx(doc._id)){
|
|
435
|
+
|
|
436
|
+
// }
|
|
437
|
+
// }
|
|
432
438
|
|
|
433
439
|
return {
|
|
434
440
|
code: 1,
|
|
@@ -719,7 +725,7 @@ exports.notifications_validation_fx = async function (notification_id) {
|
|
|
719
725
|
await db_module.save_couch_doc("xuda_notification", doc);
|
|
720
726
|
};
|
|
721
727
|
|
|
722
|
-
if (code < 0) return;
|
|
728
|
+
if (code < 0) return false;
|
|
723
729
|
|
|
724
730
|
if (!doc.topic) {
|
|
725
731
|
await delete_notification();
|