Fix an issue with account portal redis connection, if no Redis port is supplied in URL we should assume the default port number 6379.

This commit is contained in:
mike12345567 2023-11-20 15:34:16 +00:00
parent 7e037099b4
commit 8fdf378a57
1 changed files with 3 additions and 1 deletions

View File

@ -75,10 +75,12 @@ export function getRedisConnectionDetails() {
} }
const [host, port] = url.split(":") const [host, port] = url.split(":")
const portNumber = parseInt(port)
return { return {
host, host,
password, password,
port: parseInt(port), // assume default port for redis if invalid found
port: isNaN(portNumber) ? 6379 : portNumber,
} }
} }