* chore: apps/[slug] remove pages router * remove apps/[slug] pages from /future * chore: apps/installed remove pages router * chore: apps/installation remove pages router * remove Head element * fix metadata * fix test * fix another test * chore: apps/categories remove pages router * revert unneeded changes * update middleware * Remove <Head> * remove unused import and code * remove unused import and code again * fix * fix category page * add split icon * add /routing paths to middleware matcher * wip * remove HeadSeo from App.tsx * clean up head-seo test * add generateAppMetadata * use generateAppMetadata in apps/[slug] page * delete file * remove log * fix * fix * fix apps/installed pages * fix cateogires pages * fix * fix imports * wip * fix * fix * fix metadata * fix * redirect /apps/routing-forms to /routing * replace all usages of /apps/routing-forms to /routing * better naming * /routing -> /routing/forms * fix * fix * fix * fix * remove backPath as it is irrelevant when withoutMain is true * fix type checks * fix type check in apps/[slug] * refactors * fix * fix test * fix * fix * fix * Replace multiple leading slashes with a single slash * migrate routing-forms too * add re routing * fix * add redirection --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
28 lines
665 B
TypeScript
28 lines
665 B
TypeScript
import prisma from "@calcom/prisma";
|
|
import type { AppDeclarativeHandler } from "@calcom/types/AppHandler";
|
|
|
|
import appConfig from "../config.json";
|
|
|
|
const handler: AppDeclarativeHandler = {
|
|
appType: appConfig.type,
|
|
variant: appConfig.variant,
|
|
slug: appConfig.slug,
|
|
supportsMultipleInstalls: false,
|
|
handlerType: "add",
|
|
createCredential: async ({ user, appType, slug, teamId }) => {
|
|
return await prisma.credential.create({
|
|
data: {
|
|
type: appType,
|
|
key: {},
|
|
...(teamId ? { teamId } : { userId: user.id }),
|
|
appId: slug,
|
|
},
|
|
});
|
|
},
|
|
redirect: {
|
|
url: "/routing/forms",
|
|
},
|
|
};
|
|
|
|
export default handler;
|