feat: database as plugin

This commit is contained in:
 Ilya Atamas
2019-04-22 12:49:19 +03:00
parent ab36f4f081
commit 838154ce9c
10 changed files with 82 additions and 41 deletions

View File

@@ -52,7 +52,7 @@ func (proxy Proxy) NoRouteHandler(c *gin.Context) {
// } else
if c.Request.URL.Path == "/" {
_, err := proxy.RedisClient.Ping().Result()
err := proxy.Database.Health()
if err != nil {
c.AbortWithStatusJSON(503, err)