You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
400 B
TypeScript

import type { PageContextServer } from "vike/types";
import { createCaller } from "../trpc.js";
export type Data = Awaited<ReturnType<typeof data>>;
export const data = async (pageContext: PageContextServer) => {
const { id } = pageContext.routeParams;
const caller = createCaller({});
const conversation = await caller.fetchConversation({
id: Number(id),
});
return conversation;
};