added health check endpoint + fixed logging

* set go-gin to release mode
* added health check endpoint
* excluded endpoint from logger

see #63
This commit is contained in:
Bernhard B
2021-01-16 20:12:12 +01:00
parent 0ae4a5b0af
commit f5d3880c49
6 changed files with 78 additions and 4 deletions

View File

@@ -850,3 +850,13 @@ func (a *Api) UpdateProfile(c *gin.Context) {
cleanupTmpFiles(avatarTmpPaths)
c.Status(http.StatusNoContent)
}
// @Summary API Health Check
// @Tags General
// @Description Internally used by the docker container to perform the health check.
// @Produce json
// @Success 204 {string} OK
// @Router /v1/health [get]
func (a *Api) Health(c *gin.Context) {
c.Status(http.StatusNoContent)
}