mirror of
https://github.com/hanzoai/calendar.git
synced 2026-09-24 22:42:24 +00:00
* app initialization * btcpay-calcom payment * include logo and images * resolve comments * include USD and webhook cleaning * currency display * fix type error * payment service create error * type error fix * icon update * bot feedback update * Remove console * Remove currency suffix in price * fix coderRabbit comment * resolve extra comments * Use repositories and declarative installation ocode for app * use PrismaBookingPaymentRepository as well as fix UI view * Avoid fetching booking just for title which is already passed to create fn in handlePayment * fix type issues * return 200 if payment is already processed --------- Co-authored-by: Anik Dhabal Babu <[email protected]> Co-authored-by: Hariom Balhara <[email protected]> Co-authored-by: Omar López <[email protected]>
26 lines
945 B
TypeScript
26 lines
945 B
TypeScript
import type { GetServerSidePropsContext } from "next";
|
|
|
|
export const AppSetupPageMap = {
|
|
alby: import("../../alby/pages/setup/_getServerSideProps"),
|
|
make: import("../../make/pages/setup/_getServerSideProps"),
|
|
zapier: import("../../zapier/pages/setup/_getServerSideProps"),
|
|
stripe: import("../../stripepayment/pages/setup/_getServerSideProps"),
|
|
hitpay: import("../../hitpay/pages/setup/_getServerSideProps"),
|
|
btcpayserver: import("../../btcpayserver/pages/setup/_getServerSideProps"),
|
|
};
|
|
|
|
export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
|
|
const { slug } = ctx.params || {};
|
|
if (typeof slug !== "string") return { notFound: true } as const;
|
|
|
|
if (!(slug in AppSetupPageMap)) return { props: {} };
|
|
|
|
const page = await AppSetupPageMap[slug as keyof typeof AppSetupPageMap];
|
|
|
|
if (!page.getServerSideProps) return { props: {} };
|
|
|
|
const props = await page.getServerSideProps(ctx);
|
|
|
|
return props;
|
|
};
|