chore: tech debt clearing - getServerSession has a dead arg: res (#19053)
* remove res from arg list in getServerSession * remove res from all usages of getServerSession
This commit is contained in:
1 parent
15d6839985
commit
f0dc3bba17
29 files changed
+42
-45
No files matched your search
@@ -199,7 +199,7 @@ const getAppInstallsBySlug = async (appSlug: string, userId: number, teamIds?: n
|
||||
};
|
||||
|
||||
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
|
||||
const { req, res, query, params } = context;
|
||||
const { req, query, params } = context;
|
||||
let eventTypeGroups: TEventTypeGroup[] | null = null;
|
||||
let isOrg = false;
|
||||
const stepsEnum = z.enum(STEPS);
|
||||
@@ -207,7 +207,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>
|
||||
const parsedStepParam = z.coerce.string().parse(params?.step);
|
||||
const parsedTeamIdParam = z.coerce.number().optional().parse(query?.teamId);
|
||||
const _ = stepsEnum.parse(parsedStepParam);
|
||||
const session = await getServerSession({ req, res });
|
||||
const session = await getServerSession({ req });
|
||||
if (!session?.user?.id) return { redirect: { permanent: false, destination: "/auth/login" } };
|
||||
const locale = await getLocale(context.req);
|
||||
const app = await getAppBySlug(parsedAppSlug);
|
||||
|
||||
@@ -17,7 +17,7 @@ import type { inferSSRProps } from "@lib/types/inferSSRProps";
|
||||
export type PageProps = inferSSRProps<typeof getServerSideProps> & EmbedProps;
|
||||
|
||||
async function getUserPageProps(context: GetServerSidePropsContext) {
|
||||
const session = await getServerSession(context);
|
||||
const session = await getServerSession({ req: context.req });
|
||||
const { link, slug } = paramsSchema.parse(context.params);
|
||||
const { rescheduleUid, duration: queryDuration } = context.query;
|
||||
const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(context.req);
|
||||
|
||||
@@ -23,7 +23,7 @@ const querySchema = z.object({
|
||||
});
|
||||
|
||||
export async function getServerSideProps(context: GetServerSidePropsContext) {
|
||||
const session = await getServerSession(context);
|
||||
const session = await getServerSession({ req: context.req });
|
||||
|
||||
const {
|
||||
uid: bookingUid,
|
||||
|
||||
@@ -6,7 +6,6 @@ import { getOptions } from "@calcom/feature-auth/lib/next-auth-options";
|
||||
export const getServerSideProps = async (context: GetServerSidePropsContext) => {
|
||||
const session = await getServerSession({
|
||||
req: context.req,
|
||||
res: context.res,
|
||||
authOptions: getOptions({
|
||||
getDubId: () => context.req.cookies.dub_id || context.req.cookies.dclid,
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user