import { Injectable } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { Config } from "../config/schema"; @Injectable() export class FeatureService { constructor(private readonly configService: ConfigService) {} getFeatures() { const isSignupsDisabled = this.configService.getOrThrow("DISABLE_SIGNUPS"); const isEmailAuthDisabled = this.configService.getOrThrow("DISABLE_EMAIL_AUTH"); return { isSignupsDisabled, isEmailAuthDisabled, }; } }