fix: use host as prefix of cacheServer if undefined

This commit is contained in:
Namekuji 2023-07-06 17:06:31 -04:00
parent e61b229229
commit c51e5074cf
No known key found for this signature in database
GPG key ID: 1D62332C07FBA532
2 changed files with 3 additions and 1 deletions

View file

@ -55,6 +55,8 @@ export default function load() {
mixin.clientEntry = clientManifest["src/init.ts"];
if (!config.redis.prefix) config.redis.prefix = mixin.host;
if (config.cacheServer && !config.cacheServer.prefix)
config.cacheServer.prefix = mixin.host;
return Object.assign(config, mixin);
}

View file

@ -26,7 +26,7 @@ export type Source = {
user?: string;
tls?: { [y: string]: string };
};
cacheServer: {
cacheServer?: {
host: string;
port: number;
family?: number;