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

fix: use deleteMany for models where accountId is not unique when deleting account (#1290)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1290

5817b48d
Sainan <sainan@calamity.inc>
提交于

代码差异

1 个文件 +2 -2
Modified src/controllers/custom/deleteAccountController.ts +2 -2
@@ -14,12 +14,12 @@ export const deleteAccountController: RequestHandler = async (req, res) => {
14 14 // TODO: Handle the account being the creator of a guild
15 15 await Promise.all([
16 16 Account.deleteOne({ _id: accountId }),
17 GuildMember.deleteOne({ accountId: accountId }),
17 GuildMember.deleteMany({ accountId: accountId }),
18 18 Inbox.deleteMany({ ownerId: accountId }),
19 19 Inventory.deleteOne({ accountOwnerId: accountId }),
20 20 Loadout.deleteOne({ loadoutOwnerId: accountId }),
21 21 PersonalRooms.deleteOne({ personalRoomsOwnerId: accountId }),
22 Ship.deleteOne({ ShipOwnerId: accountId }),
22 Ship.deleteMany({ ShipOwnerId: accountId }),
23 23 Stats.deleteOne({ accountOwnerId: accountId })
24 24 ]);
25 25 res.end();