From b4e973c3caa1cf715e6cd48e0295d82392838a65 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 10 Aug 2021 01:48:56 +0200 Subject: [PATCH] :bug: fix bans --- package-lock.json | 14 +++++++------- package.json | 2 +- src/routes/guilds/#guild_id/bans.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 28447c45..59d3f585 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@fosscord/server-util": "^1.3.45", + "@fosscord/server-util": "^1.3.46", "@types/jest": "^26.0.22", "@types/json-schema": "^7.0.7", "ajv": "^8.4.0", @@ -678,9 +678,9 @@ } }, "node_modules/@fosscord/server-util": { - "version": "1.3.45", - "resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.45.tgz", - "integrity": "sha512-0IlapIxDOBlU5CtMgTyr6Pc8e+MLqvrcpxFz6Ql+t+bJJkOfTpCR2fk8qSKoDiNijR/S1gHO87vcIvHN/WL98Q==", + "version": "1.3.46", + "resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.46.tgz", + "integrity": "sha512-YX2pSkgsxrFcdEVXQWuQYHmT+P0Y+BtGRopZf5HKeHbjDl4/Bblj/GRU55qvtHsW5/6XQBZCG/GoeTu/MMQ+xw==", "dependencies": { "@types/jsonwebtoken": "^8.5.0", "@types/mongoose-autopopulate": "^0.10.1", @@ -11457,9 +11457,9 @@ } }, "@fosscord/server-util": { - "version": "1.3.45", - "resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.45.tgz", - "integrity": "sha512-0IlapIxDOBlU5CtMgTyr6Pc8e+MLqvrcpxFz6Ql+t+bJJkOfTpCR2fk8qSKoDiNijR/S1gHO87vcIvHN/WL98Q==", + "version": "1.3.46", + "resolved": "https://registry.npmjs.org/@fosscord/server-util/-/server-util-1.3.46.tgz", + "integrity": "sha512-YX2pSkgsxrFcdEVXQWuQYHmT+P0Y+BtGRopZf5HKeHbjDl4/Bblj/GRU55qvtHsW5/6XQBZCG/GoeTu/MMQ+xw==", "requires": { "@types/jsonwebtoken": "^8.5.0", "@types/mongoose-autopopulate": "^0.10.1", diff --git a/package.json b/package.json index a254e6d2..3b82df12 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ }, "homepage": "https://github.com/fosscord/fosscord-api#readme", "dependencies": { - "@fosscord/server-util": "^1.3.45", + "@fosscord/server-util": "^1.3.46", "@types/jest": "^26.0.22", "@types/json-schema": "^7.0.7", "ajv": "^8.4.0", diff --git a/src/routes/guilds/#guild_id/bans.ts b/src/routes/guilds/#guild_id/bans.ts index 4d9bad37..d9752f61 100644 --- a/src/routes/guilds/#guild_id/bans.ts +++ b/src/routes/guilds/#guild_id/bans.ts @@ -16,7 +16,7 @@ router.get("/", async (req: Request, res: Response) => { const guild = await GuildModel.exists({ id: guild_id }); if (!guild) throw new HTTPError("Guild not found", 404); - var bans = await BanModel.find({ guild_id: guild_id }, { user: true, reason: true }).exec(); + var bans = await BanModel.find({ guild_id: guild_id }, { user_id: true, reason: true }).exec(); return res.json(toObject(bans)); });