From b39d0055ef353d4657a58061584f5f69f9d2c418 Mon Sep 17 00:00:00 2001 From: dy Date: Fri, 15 Dec 2023 12:01:38 +0800 Subject: [PATCH] fix bug --- src/public/pay.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/public/pay.ts b/src/public/pay.ts index 8c48aa5..ef43757 100644 --- a/src/public/pay.ts +++ b/src/public/pay.ts @@ -61,10 +61,13 @@ export class PayFun { {$set: {del_time: G.time}}, {upsert: true} ); - }) - G.mongodb.collection('payLogNew').insertMany(args.map(i => ({key: i.payId, uid: uid, values: i.val}))); + G.mongodb.collection('payLogNew').insertMany(args.filter(v => v.payId && v.val).map(i => ({ + key: i.payId, + uid: uid, + values: i.val + }))); G.server.sendMsgByUid(uid, 'msg_s2c/PayChange', Object.fromEntries(args.map(a => [a.payId, a.val]))); }