summary refs log tree commit diff
path: root/src/routes/channels
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-24 12:49:10 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-24 12:49:10 +0200
commit1c7bbfdcfe7d1f04f525d0eb12908d1d8a29469c (patch)
tree840a36d8745521c70459acde2d246b7f16c58bcd /src/routes/channels
parent:art: change default port to 1000 + CORS (diff)
downloadserver-1c7bbfdcfe7d1f04f525d0eb12908d1d8a29469c.tar.xz
:bug: fix type in Channel Messages
Diffstat (limited to 'src/routes/channels')
-rw-r--r--src/routes/channels/#channel_id/messages/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/channels/#channel_id/messages/index.ts b/src/routes/channels/#channel_id/messages/index.ts
index 4978b98a..c3ea3da9 100644
--- a/src/routes/channels/#channel_id/messages/index.ts
+++ b/src/routes/channels/#channel_id/messages/index.ts
@@ -69,7 +69,7 @@ router.get("/", async (req, res) => {
 		if (!channel.recipients.includes(req.user_id)) throw new HTTPError("You don't have permission to view this channel", 401);
 	}
 
-	var query: Query<MessageDocument[], MessageDocument, {}>;
+	var query: Query<MessageDocument[], MessageDocument>;
 	if (after) query = MessageModel.find({ channel_id, id: { $gt: after } });
 	else if (before) query = MessageModel.find({ channel_id, id: { $lt: before } });
 	else if (around)