mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fixes
This commit is contained in:
parent
c2e652adfc
commit
ed616130b8
@ -214,7 +214,7 @@ module.exports = {
|
|||||||
|
|
||||||
get_meta: true,
|
get_meta: true,
|
||||||
async get({ conid }) {
|
async get({ conid }) {
|
||||||
if (portalConnections) return portalConnections.find(x => x._id == conid);
|
if (portalConnections) return portalConnections.find(x => x._id == conid) || null;
|
||||||
const res = await this.datastore.find({ _id: conid });
|
const res = await this.datastore.find({ _id: conid });
|
||||||
return res[0] || null;
|
return res[0] || null;
|
||||||
},
|
},
|
||||||
|
@ -252,6 +252,7 @@ module.exports = {
|
|||||||
|
|
||||||
serverVersion_meta: true,
|
serverVersion_meta: true,
|
||||||
async serverVersion({ conid, database }) {
|
async serverVersion({ conid, database }) {
|
||||||
|
if (!conid) return null;
|
||||||
const opened = await this.ensureOpened(conid, database);
|
const opened = await this.ensureOpened(conid, database);
|
||||||
return opened.serverVersion || null;
|
return opened.serverVersion || null;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user