mirror of
https://github.com/pushbits/server.git
synced 2025-05-31 17:56:33 +02:00
add openapi docu
This commit is contained in:
parent
afa4a9f866
commit
54d3cef46a
6 changed files with 109 additions and 22 deletions
|
@ -11,7 +11,13 @@ type HealthHandler struct {
|
|||
DB Database
|
||||
}
|
||||
|
||||
// Health returns the health status of the server.
|
||||
// Health godoc
|
||||
// @Summary Health of the application
|
||||
// @Accept json,mpfd
|
||||
// @Produce json
|
||||
// @Success 200 ""
|
||||
// @Failure 500 ""
|
||||
// @Router /health [get]
|
||||
func (h *HealthHandler) Health(ctx *gin.Context) {
|
||||
if err := h.DB.Health(); err != nil {
|
||||
ctx.AbortWithError(http.StatusInternalServerError, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue