Removed useless struct
This commit is contained in:
@@ -7,11 +7,9 @@ import (
|
|||||||
"github.com/go-redis/redis/v8"
|
"github.com/go-redis/redis/v8"
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
)
|
|
||||||
|
|
||||||
type HealthResponse struct {
|
common "git.ego.freeddns.org/egommerce/api-entities/common/dto"
|
||||||
Status string `json:"status,omitempty"`
|
)
|
||||||
}
|
|
||||||
|
|
||||||
func HealthHandlerFn(db *pgxpool.Pool, cache *redis.Client) fiber.Handler {
|
func HealthHandlerFn(db *pgxpool.Pool, cache *redis.Client) fiber.Handler {
|
||||||
return func(c *fiber.Ctx) error {
|
return func(c *fiber.Ctx) error {
|
||||||
@@ -26,7 +24,7 @@ func HealthHandlerFn(db *pgxpool.Pool, cache *redis.Client) fiber.Handler {
|
|||||||
return c.SendStatus(http.StatusNotFound)
|
return c.SendStatus(http.StatusNotFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.JSON(&HealthResponse{
|
return c.JSON(&common.HealthResponseDTO{
|
||||||
Status: "OK",
|
Status: "OK",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user