summary refs log tree commit diff
path: root/src/api/routes/download/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/routes/download/index.ts')
-rw-r--r--src/api/routes/download/index.ts15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/api/routes/download/index.ts b/src/api/routes/download/index.ts
index 371c0fd7..1c135f25 100644
--- a/src/api/routes/download/index.ts
+++ b/src/api/routes/download/index.ts
@@ -12,19 +12,20 @@ const router = Router();
 router.get("/", route({}), async (req: Request, res: Response) => {
 	const { platform } = req.query;
 
-	if (!platform) throw FieldErrors({
-		platform: {
-			code: "BASE_TYPE_REQUIRED",
-			message: req.t("common:field.BASE_TYPE_REQUIRED"),
-		}
-	});
+	if (!platform)
+		throw FieldErrors({
+			platform: {
+				code: "BASE_TYPE_REQUIRED",
+				message: req.t("common:field.BASE_TYPE_REQUIRED"),
+			},
+		});
 
 	const release = await Release.findOneOrFail({
 		where: {
 			enabled: true,
 			platform: platform as string,
 		},
-		order: { pub_date: "DESC" }
+		order: { pub_date: "DESC" },
 	});
 
 	res.redirect(release.url);