Revert "fix #129"

This reverts commit 8f862f0e5dba3985b4f38406fc19b5c5350324b9.
This commit is contained in:
Flam3rboy 2021-09-16 20:49:12 +02:00
parent d2d7dd0561
commit 173f03c596

View File

@ -1,17 +0,0 @@
import { Router, Response, Request } from "express";
import { route } from "@fosscord/api";
import { Webhook } from "@fosscord/util";
const router: Router = Router();
router.get("/", route({ permission: "MANAGE_WEBHOOKS" }), async (req: Request, res: Response) => {
const webhooks = await Webhook.find({
where: { guild_id: req.params.guild_id },
select: ["application", "avatar", "channel_id", "guild_id", "id", "token", "type", "user", "source_guild", "name"],
relations: ["user", "application", "source_guild"]
});
return res.json(webhooks);
});
export default router;