cal.pub0.org/apps/api/lib/helpers/extendRequest.ts

10 lines
206 B
TypeScript

import type { NextMiddleware } from "next-api-middleware";
export const extendRequest: NextMiddleware = async (req, res, next) => {
req.pagination = {
take: 100,
skip: 0,
};
await next();
};