I'm probably forgetting a lot of things, but hey, it works
This commit is contained in:
parent
455d7432cf
commit
5474ff5fbe
@ -5,7 +5,6 @@ import { Application, OrmUtils, Team, trimSpecial, User } from "@fosscord/util";
|
|||||||
const router: Router = Router();
|
const router: Router = Router();
|
||||||
|
|
||||||
router.get("/", route({}), async (req: Request, res: Response) => {
|
router.get("/", route({}), async (req: Request, res: Response) => {
|
||||||
//TODO
|
|
||||||
let results = await Application.findOne({where: {id: req.params.id}, relations: ["owner", "bot"] });
|
let results = await Application.findOne({where: {id: req.params.id}, relations: ["owner", "bot"] });
|
||||||
res.json(results).status(200);
|
res.json(results).status(200);
|
||||||
});
|
});
|
||||||
@ -23,4 +22,10 @@ router.patch("/", route({}), async (req: Request, res: Response) => {
|
|||||||
res.json(app).status(200);
|
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;
|
export default router;
|
Loading…
x
Reference in New Issue
Block a user