cal.pub0.org/packages/app-store/closecom/api/_getAdd.ts

11 lines
409 B
TypeScript
Raw Normal View History

import type { NextApiRequest, NextApiResponse } from "next";
import checkSession from "../../_utils/auth";
import { checkInstalled } from "../../_utils/installation";
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const session = checkSession(req);
await checkInstalled("closecom", session.user?.id);
return res.status(200).json({ url: "/apps/closecom/setup" });
}