added ping.gg app (#3728)
* added ping.gg app, not sure why its not showing * nit * Fixes * fixed email Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
1 parent
1a3aaa134e
commit
1332b76441
23 files changed
+192
-12
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
import { defaultResponder } from "@calcom/lib/server";
|
||||
|
||||
import checkSession from "../../_utils/auth";
|
||||
import { checkInstalled, createDefaultInstallation } from "../../_utils/installation";
|
||||
import appConfig from "../config.json";
|
||||
|
||||
export async function getHandler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const session = checkSession(req);
|
||||
const slug = appConfig.slug;
|
||||
const appType = appConfig.type;
|
||||
|
||||
await checkInstalled(slug, session.user.id);
|
||||
await createDefaultInstallation({
|
||||
appType,
|
||||
userId: session.user.id,
|
||||
slug,
|
||||
key: {},
|
||||
});
|
||||
|
||||
return { url: "/apps/installed" };
|
||||
}
|
||||
|
||||
export default defaultResponder(getHandler);
|
||||
@@ -0,0 +1,5 @@
|
||||
import { defaultHandler } from "@calcom/lib/server";
|
||||
|
||||
export default defaultHandler({
|
||||
GET: import("./_getAdd"),
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
export { default as add } from "./add";
|
||||
Reference in new issue
Block a user