first commit
This commit is contained in:
13
calcom/packages/app-store/closecom/api/_getAdd.ts
Normal file
13
calcom/packages/app-store/closecom/api/_getAdd.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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);
|
||||
|
||||
const returnTo = req.query.returnTo;
|
||||
|
||||
return res.status(200).json({ url: `/apps/closecom/setup${returnTo ? `?returnTo=${returnTo}` : ""}` });
|
||||
}
|
||||
Reference in New Issue
Block a user