summary refs log tree commit diff
path: root/src/routes/guilds/#guild_id/channels.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/guilds/#guild_id/channels.ts')
-rw-r--r--src/routes/guilds/#guild_id/channels.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/guilds/#guild_id/channels.ts b/src/routes/guilds/#guild_id/channels.ts

index 9d8a95b0..a3c6f4fe 100644 --- a/src/routes/guilds/#guild_id/channels.ts +++ b/src/routes/guilds/#guild_id/channels.ts
@@ -1,4 +1,4 @@ -import { Router } from "express"; +import { Router, Response, Request } from "express"; import { ChannelCreateEvent, ChannelModel, @@ -16,14 +16,14 @@ import { check } from "../../../util/instanceOf"; import { createChannel } from "../../../util/Channel"; const router = Router(); -router.get("/", async (req, res) => { +router.get("/", async (req: Request, res: Response) => { const { guild_id } = req.params; const channels = await ChannelModel.find({ guild_id }).exec(); res.json(toObject(channels)); }); -router.post("/", check(ChannelModifySchema), async (req, res) => { +router.post("/", check(ChannelModifySchema), async (req: Request, res: Response) => { const { guild_id } = req.params; const body = req.body as ChannelModifySchema; @@ -32,7 +32,7 @@ router.post("/", check(ChannelModifySchema), async (req, res) => { res.json(channel); }); -router.patch("/", check(ChannelModifySchema), async (req, res) => { +router.patch("/", check(ChannelModifySchema), async (req: Request, res: Response) => { const { guild_id } = req.params; const body = req.body as ChannelModifySchema;