diff --git a/concord-server/src/routes/index.ts b/concord-server/src/routes/index.ts index 84ef367..bb09610 100644 --- a/concord-server/src/routes/index.ts +++ b/concord-server/src/routes/index.ts @@ -5,6 +5,7 @@ import messageRoutes from "./messageRoutes"; import { channelRoutes } from "./channelRoutes"; import instanceRoutes from "./instanceRoutes"; import { categoryRoutes } from "./categoryRoutes"; +import realtimeRoutes from "./realtimeRoutes"; const routes = new Hono(); @@ -13,5 +14,6 @@ routes.route("/message", messageRoutes); routes.route("/channel", channelRoutes); routes.route("/instance", instanceRoutes); routes.route("/category", categoryRoutes); +routes.route("/realtime", realtimeRoutes); export default routes; diff --git a/concord-server/src/routes/realtimeRoutes.ts b/concord-server/src/routes/realtimeRoutes.ts index aa496a6..cb44dd1 100644 --- a/concord-server/src/routes/realtimeRoutes.ts +++ b/concord-server/src/routes/realtimeRoutes.ts @@ -13,7 +13,7 @@ import { const realtimeRoutes = new Hono(); realtimeRoutes.post( - "message/:instanceId/:categoryId/:channelId", + "/message/:instanceId/:categoryId/:channelId", describeRoute({ description: "Post a message to a channel", responses: { @@ -70,7 +70,7 @@ realtimeRoutes.post( token, repliedMessageId: repliedMessageId ?? null, }) - + if (result === "event not implemented") { return c.json({ success: false, message: "Event not implemented or recognized" }, 400); } @@ -85,4 +85,6 @@ realtimeRoutes.post( return c.json({ success: true, result }, 200); } -); \ No newline at end of file +); + +export default realtimeRoutes; \ No newline at end of file