init push
This commit is contained in:
22
internal/transport/http/handlers/health_handler.go
Normal file
22
internal/transport/http/handlers/health_handler.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"wucher/internal/transport/http/jsonapi"
|
||||
"wucher/internal/transport/http/response"
|
||||
)
|
||||
|
||||
type HealthHandler struct{}
|
||||
|
||||
func NewHealthHandler() *HealthHandler {
|
||||
return &HealthHandler{}
|
||||
}
|
||||
|
||||
func (h *HealthHandler) Handle(c *fiber.Ctx) error {
|
||||
return response.Write(c, fiber.StatusOK, jsonapi.Resource{
|
||||
Type: "health",
|
||||
Attributes: map[string]any{
|
||||
"status": "ok",
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user