mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-14 06:47:00 +10:00
20 lines
535 B
TypeScript
20 lines
535 B
TypeScript
import { Injectable } from "@nestjs/common";
|
|
import { ConfigService } from "@nestjs/config";
|
|
|
|
import { Config } from "../config/schema";
|
|
|
|
@Injectable()
|
|
export class FeatureService {
|
|
constructor(private readonly configService: ConfigService<Config>) {}
|
|
|
|
getFeatures() {
|
|
const isSignupsDisabled = this.configService.getOrThrow<boolean>("DISABLE_SIGNUPS");
|
|
const isEmailAuthDisabled = this.configService.getOrThrow<boolean>("DISABLE_EMAIL_AUTH");
|
|
|
|
return {
|
|
isSignupsDisabled,
|
|
isEmailAuthDisabled,
|
|
};
|
|
}
|
|
}
|