Skip to content

Scheduling infrastructure for absolutely everyone.

Merge pull request #135 from calcom/feat/availability-teams

Agusti Fernandez Pardo2bb6c7de4514
diff --cc lib/helpers/extendRequest.ts
index 5ae84596d18,14de4044182..2924782d3e7
--- a/lib/helpers/extendRequest.ts
+++ b/lib/helpers/extendRequest.ts
@@@ -13,8 -13,9 +13,9 @@@ declare module "next"
method: string;
prisma: PrismaClient;
session: { user: { id: number } };
- query: { [key: string]: string | string[] };
+ query: Partial<{ [key: string]: string | string[] }>;
isAdmin: boolean;
+ pagination: { take: number; skip: number };
}
}
export const extendRequest: NextMiddleware = async (req, res, next) => {
diff --cc next.config.js
index 8c5749db559,344d6fdef86..46c57d7081a
--- a/next.config.js
+++ b/next.config.js
@@@ -8,38 -8,35 +8,39 @@@ const withTM = require("next-transpile-
"@calcom/prisma",
"@calcom/stripe",
"@calcom/ui",
+ "@calcom/dayjs",
"@calcom/emails",
"@calcom/embed-core",
+ "@calcom/dayjs",
"@calcom/embed-snippet",
]);
+const { withAxiom } = require("next-axiom");
-module.exports = withTM({
- async rewrites() {
- return {
- afterFiles: [
- // This redirects requests recieved at / the root to the /api/ folder.
- {
- source: "/v:version/:rest*",
- destination: "/api/v:version/:rest*",
- },
- // This redirects requests to api/v*/ to /api/ passing version as a query parameter.
- {
- source: "/api/v:version/:rest*",
- destination: "/api/:rest*?version=:version",
- },
- ],
- fallback: [
- // These rewrites are checked after both pages/public files
- // and dynamic routes are checked
- {
- source: "/:path*",
- destination: `/api/:path*`,
- },
- ],
- };
- },
-});
+module.exports = withAxiom(
+ withTM({
+ async rewrites() {
+ return {
+ afterFiles: [
+ // This redirects requests recieved at / the root to the /api/ folder.
+ {
+ source: "/v:version/:rest*",
+ destination: "/api/v:version/:rest*",
+ },
+ // This redirects requests to api/v*/ to /api/ passing version as a query parameter.
+ {
+ source: "/api/v:version/:rest*",
+ destination: "/api/:rest*?version=:version",
+ },
+ ],
+ fallback: [
+ // These rewrites are checked after both pages/public files
+ // and dynamic routes are checked
+ {
+ source: "/:path*",
+ destination: `/api/:path*`,
+ },
+ ],
+ };
+ },
+ })
+);