From 97f8d8f92c28ad7a2860a7ffebe9818253042330 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Wed, 24 Apr 2024 19:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=BC=80=E7=AE=B1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E4=B8=ADitem=E7=9A=84=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/chest.controller.ts | 2 +- src/models/ActivityChest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/chest.controller.ts b/src/controllers/chest.controller.ts index e48691b..b0cef90 100644 --- a/src/controllers/chest.controller.ts +++ b/src/controllers/chest.controller.ts @@ -346,7 +346,7 @@ class BoxController extends BaseController { chest.items = [] } items.forEach(item => { - chest.items.push(item.id) + chest.items.push(item) }) if (items.find(item => item.type === 1)) { user.inWhiteList = true diff --git a/src/models/ActivityChest.ts b/src/models/ActivityChest.ts index f51d1ae..dd0cbaf 100644 --- a/src/models/ActivityChest.ts +++ b/src/models/ActivityChest.ts @@ -68,8 +68,8 @@ export class ActivityChestClass extends BaseModule { @prop({ type: () => [Number], default: [] }) public bonusScores: number[] // 获得的额外奖励 - @prop({ type: () => [String], default: [] }) - public items: string[] + @prop({ type: mongoose.Schema.Types.Mixed, default: [] }) + public items: any public toJson() { return {