(subscriptionId: string, withoutCache: boolean = false)
| 259 | } |
| 260 | |
| 261 | public async getFeaturesByPlan(subscriptionId: string, withoutCache: boolean = false) { |
| 262 | if (this.isEnterprise()) { |
| 263 | const features: Record<string, string> = {} |
| 264 | for (const feature of ENTERPRISE_FEATURE_FLAGS) { |
| 265 | features[feature] = 'true' |
| 266 | } |
| 267 | return features |
| 268 | } else if (this.isCloud()) { |
| 269 | if (!this.stripeManager || !subscriptionId) { |
| 270 | return {} |
| 271 | } |
| 272 | return await this.stripeManager.getFeaturesByPlan(subscriptionId, withoutCache) |
| 273 | } |
| 274 | return {} |
| 275 | } |
| 276 | |
| 277 | public static checkFeatureByPlan(feature: string) { |
| 278 | return (req: Request, res: Response, next: NextFunction) => { |
no outgoing calls
no test coverage detected