connectors refactor

This commit is contained in:
Jan Prochazka
2020-01-04 21:59:53 +01:00
parent 235ef4764b
commit 948af4984b
12 changed files with 130 additions and 46 deletions

View 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);
},
};