import { Dub } from "https://esm.sh/dub";
const dub = new Dub({
token: Deno.env.get("DUB_API_KEY"),
workspaceId: "ws_clw65kb1i000014o06p0qaczn",
});
export default async function(req: Request): Promise<Response> {
const { shortLink } = await dub.links.upsert({
url: "https://www.val.town/v/steventey/dubLinksUpsert",
});
return Response.json({ shortLink });
}