Skip to content

Commit

Permalink
implement admin guild member delete
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 17, 2023
1 parent 8ed831c commit b634e6a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/api/routes/admin/guilds/#guild_id/members/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,26 @@ router.get(
},
);

router.delete(
"/",
route({
description: "Remove a member from a guild",
right: "ADMIN_DELETE_MEMBERS",
responses: {
204: {},
400: {
body: "APIErrorResponse",
},
404: {
body: "APIErrorResponse",
},
},
}),
async (req: Request, res: Response) => {
const { guild_id, member_id } = req.params;
await Member.removeFromGuild(member_id, guild_id);
res.sendStatus(204);
},
);

export default router;

0 comments on commit b634e6a

Please sign in to comment.