diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2022-09-26 22:08:14 +1000 |
commit | 849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50 (patch) | |
tree | 37c9af175c98116a0f48ca2d5c8b74f291b3ce85 /src/api/routes/channels/#channel_id/messages/#message_id | |
parent | Fix scripts/benchmark/connections.js (diff) | |
download | server-849b257db7d43c2f1d13d9620ce7f6ba9dfd3e50.tar.xz |
Move schemas to /src/util/schemas
Diffstat (limited to 'src/api/routes/channels/#channel_id/messages/#message_id')
-rw-r--r-- | src/api/routes/channels/#channel_id/messages/#message_id/ack.ts | 7 | ||||
-rw-r--r-- | src/api/routes/channels/#channel_id/messages/#message_id/index.ts | 6 |
2 files changed, 3 insertions, 10 deletions
diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts index 3abae7ce..bedd453c 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/ack.ts @@ -1,4 +1,4 @@ -import { emitEvent, getPermission, MessageAckEvent, ReadState, Snowflake } from "@fosscord/util"; +import { emitEvent, getPermission, MessageAckEvent, ReadState } from "@fosscord/util"; import { Request, Response, Router } from "express"; import { route } from "@fosscord/api"; @@ -8,11 +8,6 @@ const router = Router(); // TODO: send read state event to all channel members // TODO: advance-only notification cursor -export interface MessageAcknowledgeSchema { - manual?: boolean; - mention_count?: number; -} - router.post("/", route({ body: "MessageAcknowledgeSchema" }), async (req: Request, res: Response) => { const { channel_id, message_id } = req.params; diff --git a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts index a02a9abe..46b0d6bd 100644 --- a/src/api/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/src/api/routes/channels/#channel_id/messages/#message_id/index.ts @@ -1,8 +1,6 @@ import { Attachment, Channel, - Embed, - DiscordApiErrors, emitEvent, FosscordApiErrors, getPermission, @@ -12,13 +10,13 @@ import { MessageDeleteEvent, MessageUpdateEvent, Snowflake, - uploadFile + uploadFile, + MessageCreateSchema, } from "@fosscord/util"; import { Router, Response, Request } from "express"; import multer from "multer"; import { route } from "@fosscord/api"; import { handleMessage, postHandleMessage } from "@fosscord/api"; -import { MessageCreateSchema } from "../index"; import { HTTPError } from "lambert-server"; const router = Router(); |