mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 18:56:00 +00:00
database & connection color overrides
This commit is contained in:
@@ -170,6 +170,23 @@ module.exports = {
|
||||
return res;
|
||||
},
|
||||
|
||||
updateDatabase_meta: 'post',
|
||||
async updateDatabase({ conid, database, values }) {
|
||||
if (portalConnections) return;
|
||||
const conn = await this.datastore.find({ _id: conid });
|
||||
let databaseConfig = conn.databaseConfig || {};
|
||||
databaseConfig = {
|
||||
...databaseConfig,
|
||||
[database]: {
|
||||
...databaseConfig[database],
|
||||
...values,
|
||||
},
|
||||
};
|
||||
const res = await this.datastore.update({ _id: conid }, { $set: { databaseConfig } });
|
||||
socket.emitChanged('connection-list-changed');
|
||||
return res;
|
||||
},
|
||||
|
||||
delete_meta: 'post',
|
||||
async delete(connection) {
|
||||
if (portalConnections) return;
|
||||
|
||||
Reference in New Issue
Block a user