summary refs log tree commit diff
path: root/src/routes/guilds/#id/members.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/guilds/#id/members.ts')
-rw-r--r--src/routes/guilds/#id/members.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/routes/guilds/#id/members.ts b/src/routes/guilds/#id/members.ts
index 25889e2e..f95bd313 100644
--- a/src/routes/guilds/#id/members.ts
+++ b/src/routes/guilds/#id/members.ts
@@ -10,12 +10,12 @@ const router = Router();
 // TODO: not allowed for user -> only allowed for bots with privileged intents
 // TODO: send over websocket
 router.get("/", async (req: Request, res: Response) => {
-	const guild_id = BigInt(req.params.id);
+	const guild_id = req.params.id;
 	const guild = await GuildModel.findOne({ id: guild_id }).exec();
 	if (!guild) throw new HTTPError("Guild not found", 404);
 
 	try {
-		instanceOf({ $limit: new Length(Number, 1, 1000), $after: BigInt }, req.query, {
+		instanceOf({ $limit: new Length(Number, 1, 1000), $after: String }, req.query, {
 			path: "query",
 			req,
 			ref: { obj: null, key: "" },
@@ -26,7 +26,7 @@ router.get("/", async (req: Request, res: Response) => {
 
 	// @ts-ignore
 	if (!req.query.limit) req.query.limit = 1;
-	const { limit, after } = (<unknown>req.query) as { limit: number; after: bigint };
+	const { limit, after } = (<unknown>req.query) as { limit: number; after: string };
 	const query = after ? { id: { $gt: after } } : {};
 
 	var members = await MemberModel.find({ guild_id, ...query }, PublicMemberProjection)
@@ -39,8 +39,8 @@ router.get("/", async (req: Request, res: Response) => {
 });
 
 router.get("/:member", async (req: Request, res: Response) => {
-	const guild_id = BigInt(req.params.id);
-	const user_id = BigInt(req.params.member);
+	const guild_id = req.params.id;
+	const user_id = req.params.member;
 
 	const member = await MemberModel.findOne({ id: user_id, guild_id }).populate({ path: "user", select: PublicUserProjection }).exec();
 	if (!member) throw new HTTPError("Member not found", 404);