[core] Rename db max name limit

This commit is contained in:
devlikepro committed 2025-01-19 14:42:53 +07:00
1 parent bb75ad8b8e
commit 4e5f499b48
1 file changed
+4 -3
+4 -3
View File
@@ -166,8 +166,9 @@ export class SessionDetailedInfo extends SessionInfo {
engine?: any;
}
const MONGO_DB_NAME_LIMIT = 64;
const MONGO_DB_NAME_PREFIX_LEN = 'waha_noweb'.length;
// Affect almost all Databases - Sqlite, MongoDB, Postgres.
const DB_NAME_LIMIT = 64;
const DB_NAME_MAX_PREFIX_LEN = 'waha_noweb'.length;
export class SessionCreateRequest {
@ApiProperty({
@@ -177,7 +178,7 @@ export class SessionCreateRequest {
})
@IsString()
@IsOptional()
@MaxLength(MONGO_DB_NAME_LIMIT - MONGO_DB_NAME_PREFIX_LEN)
@MaxLength(DB_NAME_LIMIT - DB_NAME_MAX_PREFIX_LEN)
name: string | undefined;
@ValidateNested()