From 1666d578f13c47aef3a33ec9d55f332e2eb22993 Mon Sep 17 00:00:00 2001 From: Roee Gadot Date: Tue, 27 Apr 2021 10:33:11 +0300 Subject: [PATCH] return data directly --- api/src/pkg/controllers/entries_controller.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/api/src/pkg/controllers/entries_controller.go b/api/src/pkg/controllers/entries_controller.go index e156a55fd..9cc5f0310 100644 --- a/api/src/pkg/controllers/entries_controller.go +++ b/api/src/pkg/controllers/entries_controller.go @@ -34,10 +34,7 @@ func GetEntries(c *fiber.Ctx) error { }) } - return c.Status(fiber.StatusOK).JSON(fiber.Map{ - "error": false, - "entries": baseEntries, - }) + return c.Status(fiber.StatusOK).JSON(baseEntries) } func GetEntry(c *fiber.Ctx) error { @@ -51,8 +48,5 @@ func GetEntry(c *fiber.Ctx) error { unmarshallErr := json.Unmarshal([]byte(entryData.Entry), &fullEntry) utils.CheckErr(unmarshallErr) - return c.Status(fiber.StatusOK).JSON(fiber.Map{ - "error": false, - "msg": fullEntry, - }) + return c.Status(fiber.StatusOK).JSON(fullEntry) }