From a04394149daf7b878fd58e287b332e9d7e8c1bf4 Mon Sep 17 00:00:00 2001 From: xichaoyin Date: Fri, 5 Jan 2024 00:37:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A0=B4=E5=86=B0bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api_s2c/event/pobinglibao/ApiReceive.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api_s2c/event/pobinglibao/ApiReceive.ts b/src/api_s2c/event/pobinglibao/ApiReceive.ts index 65ddd8c..6f9133c 100644 --- a/src/api_s2c/event/pobinglibao/ApiReceive.ts +++ b/src/api_s2c/event/pobinglibao/ApiReceive.ts @@ -32,7 +32,7 @@ export default async function (call: ApiCall) { prize.push(...gift[key]); } } - + if (push.length > 0) { if (update["$push"]) { update["$push"]["record." + gift.id] = { $each: push } @@ -71,7 +71,7 @@ export default async function (call: ApiCall) { if (rec >= _payDiff || data?.record?.[gift.id] == call.req.recId) return call.errorCode(-3) - prize.concat(gift[call.req.recId]); + prize.push(...gift[call.req.recId]); update = { $push: { [`record.${gift.id}`]: call.req.recId }, }