修复破冰bug
This commit is contained in:
xichaoyin 2024-01-05 00:37:40 +08:00
parent da37b162d9
commit a04394149d

View File

@ -32,7 +32,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
prize.push(...gift[key]); prize.push(...gift[key]);
} }
} }
if (push.length > 0) { if (push.length > 0) {
if (update["$push"]) { if (update["$push"]) {
update["$push"]["record." + gift.id] = { $each: push } update["$push"]["record." + gift.id] = { $each: push }
@ -71,7 +71,7 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
if (rec >= _payDiff || data?.record?.[gift.id] == call.req.recId) return call.errorCode(-3) 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 = { update = {
$push: { [`record.${gift.id}`]: call.req.recId }, $push: { [`record.${gift.id}`]: call.req.recId },
} }