1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-22 10:22:39 +01:00

I'm probably forgetting a lot of things, but hey, it works

This commit is contained in:
ChrisChrome 2022-08-10 04:29:14 -06:00 committed by Madeline
parent 455d7432cf
commit 5474ff5fbe

View File

@ -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;