diff options
author | uurgothat <cckhmck@gmail.com> | 2021-09-30 17:57:51 +0300 |
---|---|---|
committer | uurgothat <cckhmck@gmail.com> | 2021-09-30 17:57:51 +0300 |
commit | 9e07c72a72e60ca8c3c3e6270867accd32b56ece (patch) | |
tree | 730cedf62e5075fd3f3d165d3e1fcbb1a81b91db /api/src/routes/channels/#channel_id | |
parent | Merge pull request #402 from Thesourtimes/master (diff) | |
download | server-9e07c72a72e60ca8c3c3e6270867accd32b56ece.tar.xz |
Add misc routes
Diffstat (limited to 'api/src/routes/channels/#channel_id')
-rw-r--r-- | api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts b/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts index 6753e832..8174a61f 100644 --- a/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts +++ b/api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts @@ -1,8 +1,31 @@ import { Router, Response, Request } from "express"; +import { route } from "@fosscord/api"; const router = Router(); -// TODO: -// router.post("/", (req: Request, res: Response) => {}); +router.post("/", route({ permission: "MANAGE_MESSAGES" }), (req: Request, res: Response) => { + // TODO: + //const { locale, primary_only } = req.query; + res.json({ + id: "", + type: 0, + content: "", + channel_id: "", + author: {id: "", + username: "", + avatar: "", + discriminator: "", public_flags: 64}, + attachments: [], + embeds: [], + mentions: [], + mention_roles: [], + pinned: false, + mention_everyone: false, + tts: false, + timestamp: "", + edited_timestamp: null, + flags: 1, components: []}).status(200); +}); export default router; + |