summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-23 22:44:12 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-02-23 22:44:12 +0100
commit47ad1c2713437d8106a6dbedb12ac3574794df9d (patch)
tree99eb316861c200f667ca5fa847fab32edddcd774
parent:pencil: typo (diff)
downloadserver-47ad1c2713437d8106a6dbedb12ac3574794df9d.tar.xz
get specific ban
-rw-r--r--src/routes/api/v8/guilds/#id/bans.ts9
-rw-r--r--src/routes/api/v8/guilds/#id/members/index.ts4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/routes/api/v8/guilds/#id/bans.ts b/src/routes/api/v8/guilds/#id/bans.ts
index e18a1137..8e6e35de 100644
--- a/src/routes/api/v8/guilds/#id/bans.ts
+++ b/src/routes/api/v8/guilds/#id/bans.ts
@@ -20,6 +20,15 @@ router.get("/", async (req: Request, res: Response) => {
 	return res.json(bans);
 });
 
+router.get("/:user", async (req: Request, res: Response) => {
+	const guild_id = BigInt(req.params.id);
+	const user_id = BigInt(req.params.ban);
+
+	var ban = await BanModel.findOne({ guild_id: guild_id, user_id: user_id }).exec();
+	if (!ban) throw new HTTPError("Ban not found", 404);
+	return res.json(ban);
+});
+
 router.post("/:userid", check(BanCreateSchema), async (req: Request, res: Response) => {
 	const guild_id = BigInt(req.params.id);
 	const banned_user_id = BigInt(req.params.userid);
diff --git a/src/routes/api/v8/guilds/#id/members/index.ts b/src/routes/api/v8/guilds/#id/members/index.ts
index 9446e2da..3b422dd0 100644
--- a/src/routes/api/v8/guilds/#id/members/index.ts
+++ b/src/routes/api/v8/guilds/#id/members/index.ts
@@ -49,4 +49,8 @@ router.get("/:member", async (req: Request, res: Response) => {
 	return res.json(member);
 });
 
+router.put("/:member", async (req: Request, res: Response) => {
+	// https://discord.com/developers/docs/resources/guild#add-guild-member
+});
+
 export default router;