summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
authorChrisChrome <christophercookman@gmail.com>2022-08-10 04:29:14 -0600
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-18 22:43:55 +1100
commite5be59a72d20de6f4906f2bbbe7615bcfaf4ba86 (patch)
treee2b2cbfd0bd676e08962a493c0a6bc8ca6aee849 /src/api
parentIt works now... I guess (diff)
downloadserver-e5be59a72d20de6f4906f2bbbe7615bcfaf4ba86.tar.xz
I'm probably forgetting a lot of things, but hey, it works
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/applications/#id/index.ts7
1 files changed, 6 insertions, 1 deletions
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