init
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"apskel-pos-be/internal/logger"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type HealthHandler struct {
|
||||
}
|
||||
|
||||
func NewHealthHandler() *HealthHandler {
|
||||
return &HealthHandler{}
|
||||
}
|
||||
|
||||
func (hh *HealthHandler) HealthCheck(c *gin.Context) {
|
||||
log := logger.NewContextLogger(c, "healthCheck")
|
||||
log.Info("Health Check success")
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"status": "Healthy!!",
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user