Merge branch 'bugfix' into dev
This commit is contained in:
commit
98e34a065b
@ -27,11 +27,12 @@ export default async function (call: ApiCall<ReqReceive, ResReceive>) {
|
|||||||
if (!payLog || !payLog.length) continue;
|
if (!payLog || !payLog.length) continue;
|
||||||
|
|
||||||
for (let key of ["prize", "recPrize1", "recPrize2"]) {
|
for (let key of ["prize", "recPrize1", "recPrize2"]) {
|
||||||
if (data.record[gift.id] && data.record[gift.id].includes(key)) {
|
if (!data || !data?.record[gift.id] || !data.record[gift.id].includes(key)) {
|
||||||
push.concat(key);
|
push.push(key);
|
||||||
prize.concat(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 }
|
||||||
|
Loading…
Reference in New Issue
Block a user