summary refs log tree commit diff
path: root/api/src/routes/channels
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-30 17:01:32 +0200
committerGitHub <noreply@github.com>2021-09-30 17:01:32 +0200
commit677dfca95e943bfb2a9107ee47c1766849a825ed (patch)
treece8920af6398b4edbb7baaea76b8253d12e549dc /api/src/routes/channels
parentMerge pull request #402 from Thesourtimes/master (diff)
parentAdd misc routes (diff)
downloadserver-677dfca95e943bfb2a9107ee47c1766849a825ed.tar.xz
Merge pull request #403 from Thesourtimes/master
Diffstat (limited to 'api/src/routes/channels')
-rw-r--r--api/src/routes/channels/#channel_id/messages/#message_id/crosspost.ts27
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; +