From cc0bd22caceb997a3123b57cf74715641f48fbd8 Mon Sep 17 00:00:00 2001 From: Piotr Biernat Date: Sat, 15 Nov 2025 11:47:59 +0100 Subject: [PATCH] Removed useless struct --- src/internal/http/health_handler.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/internal/http/health_handler.go b/src/internal/http/health_handler.go index 1852084..6f2eb1c 100644 --- a/src/internal/http/health_handler.go +++ b/src/internal/http/health_handler.go @@ -7,11 +7,9 @@ import ( "github.com/go-redis/redis/v8" "github.com/gofiber/fiber/v2" "github.com/jackc/pgx/v5/pgxpool" -) -type HealthResponse struct { - Status string `json:"status,omitempty"` -} + common "git.ego.freeddns.org/egommerce/api-entities/common/dto" +) func HealthHandlerFn(db *pgxpool.Pool, cache *redis.Client) fiber.Handler { 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.JSON(&HealthResponse{ + return c.JSON(&common.HealthResponseDTO{ Status: "OK", }) }