parent
e584d7f078
commit
47e9d908e7
|
@ -183,14 +183,11 @@ func (c *connectionService) OpenConnection(name string) (resp types.JSResp) {
|
|||
}
|
||||
|
||||
// get total databases
|
||||
config, err := rdb.ConfigGet(ctx, "databases").Result()
|
||||
if err != nil {
|
||||
resp.Msg = err.Error()
|
||||
return
|
||||
totaldb := 16
|
||||
if config, err := rdb.ConfigGet(ctx, "databases").Result(); err == nil {
|
||||
if total, err := strconv.Atoi(config["databases"]); err == nil {
|
||||
totaldb = total
|
||||
}
|
||||
totaldb, err := strconv.Atoi(config["database"])
|
||||
if err != nil {
|
||||
totaldb = 16
|
||||
}
|
||||
|
||||
// get database info
|
||||
|
|
Loading…
Reference in New Issue