next/lib/server/forumId.ts

17 lines
353 B
TypeScript
Raw Normal View History

import { H3Event, EventHandlerRequest } from "h3";
import { apiRoot } from "./constants";
export default async function (id: number): Promise<number> {
let { data: lookup } = await useFetch<any>(
`${apiRoot}/session-sharing/lookup`,
{
method: "get",
query: {
params: {
id,
},
},
},
);
return lookup.value.uid as number;
}