From a2ae02f6d75c1951cc5527abf36801d7d8591359 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Sun, 10 Sep 2023 18:44:17 +0530 Subject: [PATCH] fix TTS 404ing for no reason --- pages/api.go | 2 +- serve/serve.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api.go b/pages/api.go index 8fc69d2..e11c000 100644 --- a/pages/api.go +++ b/pages/api.go @@ -61,7 +61,7 @@ func HandleTTS(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusInternalServerError, err.Error()) } c.Set("Content-Type", "audio/mpeg") - return c.Send(data) + return c.Status(fiber.StatusOK).Send(data) } // HandleTranslate godoc diff --git a/serve/serve.go b/serve/serve.go index 8173112..dd23252 100644 --- a/serve/serve.go +++ b/serve/serve.go @@ -9,8 +9,8 @@ import ( _ "codeberg.org/aryak/mozhi/docs" "codeberg.org/aryak/mozhi/pages" - "codeberg.org/aryak/mozhi/views" "codeberg.org/aryak/mozhi/public" + "codeberg.org/aryak/mozhi/views" "github.com/gofiber/fiber/v2" "github.com/gofiber/fiber/v2/middleware/compress" "github.com/gofiber/fiber/v2/middleware/filesystem"