返回提交历史
Modified
src/models/inventoryModels/loadoutModel.ts
+1
-1
Modified
src/types/equipmentTypes.ts
+1
-1
XFEstudio/XFESpaceNinjaServer
fix: don't provide [object Object] as a loadout item id (#4239)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4239 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2f73552c
代码差异
2 个文件
+2
-2
@@ -23,7 +23,7 @@ EquipmentSelectionSchema.set("toJSON", {
23
23
const db = ret as IEquipmentSelectionDatabase;
24
24
const client = ret as IEquipmentSelectionClient;
25
25
26
if (db.ItemId) {
26
if (db.ItemId && !("$oid" in db.ItemId)) {
27
27
client.ItemId = toOid(db.ItemId);
28
28
}
29
29
}
@@ -17,7 +17,7 @@ export interface IEquipmentSelectionClient {
17
17
}
18
18
19
19
export interface IEquipmentSelectionDatabase extends Omit<IEquipmentSelectionClient, "ItemId"> {
20
ItemId?: Types.ObjectId;
20
ItemId?: Types.ObjectId | IOid; // should be Types.ObjectId but might not be :(
21
21
}
22
22
23
23
export const eEquipmentFeatures = {