17 lines
353 B
TypeScript
17 lines
353 B
TypeScript
|
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;
|
||
|
}
|