meetandeat/controller/status.go

19 lines
342 B
Go

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,
},
})
}