Spaces:
Sleeping

asd / src /libs /shared /presentation /http /middleware /security /PlanGuardMiddleware.ts
GitHub Actions
deploy: clean snapshot
7f81110
Raw History Blame Contribute Delete
457 Bytes
import { Request, Response, NextFunction } from "express";
import { PlanUpgradeError } from "../../../../domain/errors/PlanUpgradeError";
export const PlanGuardMiddleware = (requiredPlan: string) => {
return (req: Request, res: Response, next: NextFunction) => {
// const plan = req.tenantContext?.plan;
// if (!plan || plan !== requiredPlan) {
// return next(new PlanUpgradeError());
// }
next();
};
};