diff options
Diffstat (limited to 'src/api/routes/downloads.ts')
-rw-r--r-- | src/api/routes/downloads.ts | 23 |
1 files changed, 0 insertions, 23 deletions
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; |