XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFESpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/XFESpaceNinjaServer

chore: ensure Configs array has no null entry by schema validation (#4351)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4351 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

666b4d4e
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +2 -2
Modified src/models/inventoryModels/inventoryModel.ts +2 -2
@@ -347,7 +347,7 @@ const crewMemberSchema = new Schema<ICrewMemberDatabase>(
347 347 WeaponId: { type: Schema.Types.ObjectId, default: "000000000000000000000000" },
348 348 XP: { type: Number, default: 0 },
349 349 PowersuitType: { type: String, required: false },
350 Configs: [ItemConfigSchema],
350 Configs: [{ type: ItemConfigSchema, required: true }],
351 351 SecondInCommand: { type: Boolean, default: false }
352 352 },
353 353 { id: false }
@@ -1125,7 +1125,7 @@ detailsSchema.set("toJSON", {
1125 1125 const EquipmentSchema = new Schema<IEquipmentDatabase>(
1126 1126 {
1127 1127 ItemType: String,
1128 Configs: { type: [ItemConfigSchema], default: [] },
1128 Configs: { type: [{ type: ItemConfigSchema, required: true }], default: [] },
1129 1129 UpgradeVer: { type: Number, default: 101 },
1130 1130 XP: { type: Number, default: 0 },
1131 1131 Features: Number,