Hello,
I'm getting an error when clicking on my http action in the dashboard. Any idea how to solve this?
// convex/http/mux/videoReadyHandler.ts
import { httpAction } from "@/_generated/server";
export const videoReadyHandler = httpAction(async (ctx, request) => {
const { body } = await request.json();
// TODO: Handle the video ready event
return new Response("Successfully handled the videoReady from MUX", {
status: 200,
});
});
// convex/http.ts
import { httpRouter } from "convex/server";
import { videoReadyHandler } from "./http/mux/videoReadyHandler";
const http = httpRouter();
http.route({
path: "/mux/video-ready",
method: "POST",
handler: videoReadyHandler,
});
// Convex expects the router to be the default export of `convex/http.js`.
export default http;