From 743ef41498f52eca443bf542e61bf14d73387531 Mon Sep 17 00:00:00 2001 From: bogdannbv Date: Wed, 3 Aug 2022 00:59:16 +0300 Subject: [PATCH] Update main.go to properly send a JSON --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index ac42042..14238a7 100644 --- a/main.go +++ b/main.go @@ -28,9 +28,7 @@ func main() { return fiber.NewError(fiber.StatusBadRequest, getJSONError(err.Error())) } - holidaysJson, _ := json.Marshal(holidays) - - return c.Send(holidaysJson) + return c.JSON(holidays) }) err := app.Listen(":8080")