diff --git a/controllers/transmissionController.go b/controllers/transmissionController.go index 16400af..f0536fa 100644 --- a/controllers/transmissionController.go +++ b/controllers/transmissionController.go @@ -21,7 +21,7 @@ func GetTransmissionByChannel(c *fiber.Ctx) error { transmission, exists := globals.Transmissions[channel] if !exists { - return fiber.ErrNotFound + return c.SendStatus(fiber.StatusNotFound) } return c.JSON(transmission) @@ -39,7 +39,7 @@ func WatchersCount(c *fiber.Ctx) error { return c.JSON(transmission.Watchers) } - return fiber.ErrNotFound + return c.SendStatus(fiber.StatusNotFound) } // Called when a user starts to watch a transmission @@ -65,7 +65,7 @@ func Watch(c *fiber.Ctx) error { return c.JSON(transmission.Watchers) } - return fiber.ErrNotFound + return c.SendStatus(fiber.StatusNotFound) } // Called when a user stops watching a transmission @@ -94,5 +94,5 @@ func Leave(c *fiber.Ctx) error { return c.JSON(transmission.Watchers) } - return fiber.ErrNotFound + return c.SendStatus(fiber.StatusNotFound) }