From a2789b2a5382481078ff6190c572638626d5da37 Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Wed, 11 Sep 2024 13:44:22 +0530 Subject: [PATCH] update libmozhi; fix API language regex --- go.mod | 2 +- go.sum | 4 ++-- pages/api.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index d5d6ef4..df13352 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ replace github.com/OwO-Network/gdeeplx => github.com/gi-yt/gdeeplx v0.0.0-202308 //replace codeberg.org/aryak/libmozhi => /home/arya/projects/mozhi/libmozhi require ( - codeberg.org/aryak/libmozhi v0.0.0-20240901003115-73c39bb218c2 + codeberg.org/aryak/libmozhi v0.0.0-20240911074141-3bb816223b76 github.com/gofiber/fiber/v2 v2.52.5 github.com/gofiber/swagger v1.1.0 github.com/gofiber/template v1.8.0 diff --git a/go.sum b/go.sum index 7ac29ac..fdc2a47 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,8 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -codeberg.org/aryak/libmozhi v0.0.0-20240901003115-73c39bb218c2 h1:pu7h+80d1QUc25sYzR1PhInyqH6ny8tk+Yj8Zv4eCmc= -codeberg.org/aryak/libmozhi v0.0.0-20240901003115-73c39bb218c2/go.mod h1:cLOtjCmU2AsoL1B+kOzjOMWXYcsdewK8A5s5d/lQVBM= +codeberg.org/aryak/libmozhi v0.0.0-20240911074141-3bb816223b76 h1:/vYhXnknJlKNIdoTeXVo+X9a+J7ByClUgGXNSyOs6YE= +codeberg.org/aryak/libmozhi v0.0.0-20240911074141-3bb816223b76/go.mod h1:cLOtjCmU2AsoL1B+kOzjOMWXYcsdewK8A5s5d/lQVBM= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= diff --git a/pages/api.go b/pages/api.go index 26d5670..7dcbdc7 100644 --- a/pages/api.go +++ b/pages/api.go @@ -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.")