fix TTS 404ing for no reason

This commit is contained in:
Arya Kiran 2023-09-10 18:44:17 +05:30
parent c37109db11
commit a2ae02f6d7
No known key found for this signature in database
GPG key ID: 842D12BDA50DF120
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -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"