From 0be194913036735b5bc97d74a37550d2bd099f13 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 24 Oct 2022 14:35:08 +1100 Subject: Change android and ios client downloads to use /download endpoint, update Release entity to suck less --- src/api/routes/downloads.ts | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/api/routes/downloads.ts (limited to 'src/api/routes/downloads.ts') diff --git a/src/api/routes/downloads.ts b/src/api/routes/downloads.ts deleted file mode 100644 index bc0750f7..00000000 --- a/src/api/routes/downloads.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Router, Response, Request } from "express"; -import { route } from "@fosscord/api"; -import { Release, Config } from "@fosscord/util"; - -const router = Router(); - -router.get("/:branch", route({}), async (req: Request, res: Response) => { - const { client } = Config.get(); - const { branch } = req.params; - const { platform } = req.query; - //TODO - - if (!platform || !["linux", "osx", "win"].includes(platform.toString())) - return res.status(404); - - const release = await Release.findOneOrFail({ - where: { name: client.releases.upstreamVersion }, - }); - - res.redirect(release[`win_url`]); -}); - -export default router; -- cgit 1.5.1