summary refs log tree commit diff
path: root/src/routes
diff options
context:
space:
mode:
authorIntevel ツ <59223342+Intevel@users.noreply.github.com>2021-05-06 22:59:12 +0200
committerIntevel ツ <59223342+Intevel@users.noreply.github.com>2021-05-06 22:59:12 +0200
commita295f019154b81dc04c43f168040df16b906c2b8 (patch)
tree0b6c3d18b973e969b830fb91cd9ac7a0bf1d5b4c /src/routes
parentUpdate package.json (diff)
downloadserver-a295f019154b81dc04c43f168040df16b906c2b8.tar.xz
Update index.ts
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/guilds/templates/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/guilds/templates/index.ts b/src/routes/guilds/templates/index.ts
index 2584af73..fdd70335 100644
--- a/src/routes/guilds/templates/index.ts
+++ b/src/routes/guilds/templates/index.ts
@@ -17,7 +17,7 @@ router.get("/:template_id", async (req: Request, res: Response) => {
 	if (!guild) throw new HTTPError("Guild not found", 404);
 	if (!template_id) throw new HTTPError("Unknown template_id", 404);
 
-	const template = await TemplateModel.findById({ _id: template_id }).exec();
+	const template = await TemplateModel.findOne({ id: template_id }).exec();
 	if (!template) throw new HTTPError("template not found", 404);
 
 	res.json(toObject(template)).send();