fix: main merging issues

This commit is contained in:
Agusti Fernandez Pardo committed 2022-06-18 02:16:15 +02:00
1 parent 6e68671c2a
commit 5b28e9ec1c
5 files changed
+3 -61

No files matched your search

-1
View File
@@ -18,6 +18,5 @@ declare module "next" {
}
}
export const extendRequest: NextMiddleware = async (req, res, next) => {
// @note: just an empty middleware, we care about extending the next api request types only.
await next();
};
+1 -1
View File
@@ -29,7 +29,7 @@ const withMiddleware = label(
sentry: captureErrors,
},
// The order here, determines the order of execution, put customPrismaClient before verifyApiKey always.
["sentry", "customPrismaClient", "verifyApiKey", "addRequestId", "extendRequest"] // <-- Provide a list of middleware to call automatically
["extendRequest", "sentry", "customPrismaClient", "verifyApiKey", "addRequestId"] // <-- Provide a list of middleware to call automatically
);
export { withMiddleware };