mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 10:16:00 +00:00
connectors refactor
This commit is contained in:
17
api/src/controllers/serverConnections.js
Normal file
17
api/src/controllers/serverConnections.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const connections = require('./connections');
|
||||
const socket = require('../utility/socket');
|
||||
|
||||
module.exports = {
|
||||
opened: [],
|
||||
|
||||
async ensureOpened(id) {
|
||||
const existing = this.opened.find(x => x.connection.id == id);
|
||||
if (existing) return existing;
|
||||
|
||||
},
|
||||
|
||||
listDatabases_meta: 'get',
|
||||
async listDatabases({ id }) {
|
||||
const opened = this.ensureOpened(id);
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user