return data directly

This commit is contained in:
Roee Gadot 2021-04-27 10:33:11 +03:00
parent b886af2242
commit 1666d578f1

View File

@ -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)
}