🐛 fix bans
This commit is contained in:
parent
57e397b540
commit
b36e4af9d3
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
@ -33,7 +33,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/fosscord/fosscord-api#readme",
|
"homepage": "https://github.com/fosscord/fosscord-api#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fosscord/server-util": "^1.3.45",
|
"@fosscord/server-util": "^1.3.46",
|
||||||
"@types/jest": "^26.0.22",
|
"@types/jest": "^26.0.22",
|
||||||
"@types/json-schema": "^7.0.7",
|
"@types/json-schema": "^7.0.7",
|
||||||
"ajv": "^8.4.0",
|
"ajv": "^8.4.0",
|
||||||
|
|||||||
@ -16,7 +16,7 @@ router.get("/", async (req: Request, res: Response) => {
|
|||||||
const guild = await GuildModel.exists({ id: guild_id });
|
const guild = await GuildModel.exists({ id: guild_id });
|
||||||
if (!guild) throw new HTTPError("Guild not found", 404);
|
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));
|
return res.json(toObject(bans));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user