refactor(core): Separate license state from license service (#15097)

This commit is contained in:
Iván Ovejero
2025-05-06 09:43:08 +02:00
committed by GitHub
parent e86edf536f
commit ca0e7ffe3b
18 changed files with 365 additions and 104 deletions

View File

@@ -106,7 +106,7 @@ export class ControllerRegistry {
private createLicenseMiddleware(feature: BooleanLicenseFeature): RequestHandler {
return (_req, res, next) => {
if (!this.license.isFeatureEnabled(feature)) {
if (!this.license.isLicensed(feature)) {
res.status(403).json({ status: 'error', message: 'Plan lacks license for this feature' });
return;
}