The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
suport non aws providers 1 (#21927)
znna08f424cc556
diff --git a/packages/twenty-server/src/engine/core-modules/twenty-config/config-variables.ts b/packages/twenty-server/src/engine/core-modules/twenty-config/config-variables.tsindex 3d09464d8ef..dfe1b200bd3 100644--- a/packages/twenty-server/src/engine/core-modules/twenty-config/config-variables.ts+++ b/packages/twenty-server/src/engine/core-modules/twenty-config/config-variables.ts@@ -3,7 +3,9 @@ import { Logger } from '@nestjs/common';import { plainToClass } from 'class-transformer';import {IsDefined,+ IsNotEmpty,IsOptional,+ IsString,IsUrl,ValidateIf,type ValidationError,@@ -469,11 +471,13 @@ export class ConfigVariables {@ConfigVariablesMetadata({group: ConfigVariablesGroup.STORAGE_CONFIG,- description: 'AWS region of the S3 bucket (e.g. eu-west-3). Required.',+ description:+ 'Region of the S3 bucket (e.g. "eu-west-3" for AWS, or a provider-specific slug like "fr-par" for Scaleway). Required.',type: ConfigVariableType.STRING,})@ValidateIf((env) => env.STORAGE_TYPE === StorageDriverType.S_3)- @IsAWSRegion()+ @IsString()+ @IsNotEmpty()STORAGE_S3_REGION: AwsRegion;@ConfigVariablesMetadata({diff --git a/packages/twenty-server/src/engine/core-modules/twenty-config/decorators/is-aws-region.decorator.ts b/packages/twenty-server/src/engine/core-modules/twenty-config/decorators/is-aws-region.decorator.tsindex 1bef24d9177..965a321109b 100644--- a/packages/twenty-server/src/engine/core-modules/twenty-config/decorators/is-aws-region.decorator.ts+++ b/packages/twenty-server/src/engine/core-modules/twenty-config/decorators/is-aws-region.decorator.ts@@ -5,7 +5,7 @@ import {type ValidatorConstraintInterface,} from 'class-validator';-@ValidatorConstraint({ async: true })+@ValidatorConstraint({ async: false })export class IsAWSRegionConstraint implements ValidatorConstraintInterface {validate(region: string) {const regex = /^[a-z]{2}-[a-z]+-\d{1}$/;