Feat/disable flexible backend (#1673)
* wip: refacto and start creating custom resolver * feat: findMany & findUnique of a custom entity * feat: wip pagination * feat: initial metadata migration * feat: universal findAll with pagination * fix: clean small stuff in pagination * fix: test * fix: miss file * feat: rename custom into universal * feat: enable/disable flexible backend from env --------- Co-authored-by: Charles Bochet <charles@twenty.com> Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
This commit is contained in:
@ -29,6 +29,10 @@ export class EnvironmentService {
|
||||
);
|
||||
}
|
||||
|
||||
isFlexibleBackendEnabled(): boolean {
|
||||
return this.configService.get<boolean>('FLEXIBLE_BACKEND_ENABLED') ?? false;
|
||||
}
|
||||
|
||||
getPort(): number {
|
||||
return this.configService.get<number>('PORT') ?? 3000;
|
||||
}
|
||||
|
||||
@ -46,6 +46,11 @@ export class EnvironmentVariables {
|
||||
@IsBoolean()
|
||||
TELEMETRY_ANONYMIZATION_ENABLED?: boolean;
|
||||
|
||||
@CastToBoolean()
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
FLEXIBLE_BACKEND_ENABLED?: boolean;
|
||||
|
||||
@CastToPositiveNumber()
|
||||
@IsNumber()
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user