fix: impact too many records (#3993)

* fix: impact too many records

* fix: change env name

* fix: remove env name from error
This commit is contained in:
Jérémy M
2024-02-16 11:17:37 +01:00
committed by GitHub
parent c2c14d79a9
commit 44ac16c82e
12 changed files with 107 additions and 39 deletions

View File

@ -299,4 +299,10 @@ export class EnvironmentService {
getApiRateLimitingLimit(): number {
return this.configService.get<number>('API_RATE_LIMITING_LIMIT') ?? 500;
}
getMutationMaximumRecordAffected(): number {
return (
this.configService.get<number>('MUTATION_MAXIMUM_RECORD_AFFECTED') ?? 100
);
}
}

View File

@ -199,6 +199,11 @@ export class EnvironmentVariables {
@IsOptional()
@IsBoolean()
IS_SIGN_UP_DISABLED?: boolean;
@CastToPositiveNumber()
@IsOptional()
@IsNumber()
MUTATION_MAXIMUM_RECORD_AFFECTED: number;
}
export const validate = (config: Record<string, unknown>) => {