meetandeat/controller/status.go

19 lines
342 B
Go
Raw Normal View History

2019-03-22 16:35:16 +01:00
package controller
import (
"github.com/gin-gonic/gin"
"net/http"
"dev.sum7.eu/genofire/golang-lib/database"
)
func status(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{
"status": "running",
"database": map[string]interface{}{
"read": database.Read.DB().Ping() == nil,
"write": database.Write.DB().Ping() == nil,
},
})
}