tenta algo assim:
const connectionConfig = { ...this.getDefaultConfig() };
connectionConfig.connection.database = database;
this.config.set(`database.${database}`, connectionConfig);
tenta algo assim:
const connectionConfig = { ...this.getDefaultConfig() };
connectionConfig.connection.database = database;
this.config.set(`database.${database}`, connectionConfig);
Mas qual seria a ideia, onde eu passo isso, no middleware mesmo?