From 5474ff5fbee550bfa6b8f150af68f88425b6ed09 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 10 Aug 2022 04:29:14 -0600 Subject: [PATCH] I'm probably forgetting a lot of things, but hey, it works --- src/api/routes/applications/#id/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/api/routes/applications/#id/index.ts b/src/api/routes/applications/#id/index.ts index a16b18a9..24df2d88 100644 --- a/src/api/routes/applications/#id/index.ts +++ b/src/api/routes/applications/#id/index.ts @@ -5,7 +5,6 @@ import { Application, OrmUtils, Team, trimSpecial, User } from "@fosscord/util"; const router: Router = Router(); router.get("/", route({}), async (req: Request, res: Response) => { - //TODO let results = await Application.findOne({where: {id: req.params.id}, relations: ["owner", "bot"] }); res.json(results).status(200); }); @@ -23,4 +22,10 @@ router.patch("/", route({}), async (req: Request, res: Response) => { res.json(app).status(200); }); +router.post("/delete", route({}), async (req: Request, res: Response) => { + await Application.delete(req.params.id); + res.send().status(200); +}); + + export default router; \ No newline at end of file