Merge branch 'main' into fix/booking-id

pull/9078/head
Agusti Fernandez Pardo 2022-07-08 17:14:02 +02:00
commit 13d013bdf8
3 changed files with 31 additions and 28 deletions

View File

@ -13,7 +13,7 @@ declare module "next" {
method: string;
prisma: PrismaClient;
session: { user: { id: number } };
query: { [key: string]: string | string[] };
query: Partial<{ [key: string]: string | string[] }>;
isAdmin: boolean;
}
}

View File

@ -13,30 +13,33 @@ const withTM = require("next-transpile-modules")([
"@calcom/embed-core",
"@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*`,
},
],
};
},
})
);

View File

@ -30,7 +30,7 @@
"bcryptjs": "^2.4.3",
"memory-cache": "^0.2.0",
"modify-response-middleware": "^1.1.0",
"next": "^12.1.6",
"next": "^12.2.0",
"next-api-middleware": "^1.0.1",
"next-swagger-doc": "^0.3.4",
"next-transpile-modules": "^9.0.0",