oops, forgot to mount the routes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
export default realtimeRoutes;
|
||||
Reference in New Issue
Block a user