rewrite to using new method

This commit is contained in:
2024-06-16 18:21:06 -05:00
parent f07bd666fb
commit 790c8c969a
19 changed files with 388 additions and 395 deletions

View File

@@ -0,0 +1,30 @@
package health
import (
"net/http"
"gitlab.com/developerdurp/stdmodels"
)
type Handler struct{}
func NewHandler() (*Handler, error) {
return &Handler{}, nil
}
// getHealth godoc
//
// @Summary Generate Health status
// @Description Get the health of the API
// @Tags health
// @Accept json
// @Produce application/json
// @Success 200 {object} stdmodels.StandardMessage "response"
// @failure 500 {object} stdmodels.StandardError"error"
//
// @Security Authorization
//
// @Router /health/gethealth [get]
func (h *Handler) Get(w http.ResponseWriter, r *http.Request) {
stdmodels.SuccessResponse("OK", w, http.StatusOK)
}