mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 07:56:01 +00:00
handle disconnected database
This commit is contained in:
@@ -85,6 +85,16 @@ module.exports = {
|
||||
return res;
|
||||
},
|
||||
|
||||
status_meta: 'get',
|
||||
async status({ conid, database }) {
|
||||
const existing = this.opened.find((x) => x.conid == conid && x.database == database);
|
||||
if (existing) return existing.status;
|
||||
return {
|
||||
name: 'error',
|
||||
message: 'Not connected',
|
||||
};
|
||||
},
|
||||
|
||||
ping_meta: 'post',
|
||||
async ping({ conid, database }) {
|
||||
const existing = this.opened.find((x) => x.conid == conid && x.database == database);
|
||||
|
||||
Reference in New Issue
Block a user