update libmozhi; fix API language regex
All checks were successful
mozhi pipeline / Push Docker image to Codeberg docker registry (push) Successful in 17m43s
mozhi pipeline / Build and publish artifacts (push) Successful in 54m46s

This commit is contained in:
2024-09-11 13:44:22 +05:30
parent 31bb18994b
commit a2789b2a53
3 changed files with 5 additions and 5 deletions

View File

@@ -80,8 +80,8 @@ func HandleTTS(c *fiber.Ctx) error {
// @Router /api/translate [get]
func HandleTranslate(c *fiber.Ctx) error {
engine := utils.Sanitize(utils.GetQueryOrFormValue(c, "engine"), "alpha")
from := utils.Sanitize(utils.GetQueryOrFormValue(c, "from"), "alpha")
to := utils.Sanitize(utils.GetQueryOrFormValue(c, "to"), "alpha")
from := utils.GetQueryOrFormValue(c, "from")
to := utils.GetQueryOrFormValue(c, "to")
text := utils.GetQueryOrFormValue(c, "text")
if engine == "" || from == "" || to == "" || text == "" {
return fiber.NewError(fiber.StatusBadRequest, "from, to, engine, text are required query strings.")