deepl autodetect + gofmt

This commit is contained in:
2023-08-17 19:39:18 +05:30
parent 6b7a9b3f0d
commit e666fc63cc
5 changed files with 15 additions and 9 deletions

View File

@@ -81,7 +81,7 @@ func HandleTranslate(c *fiber.Ctx) error {
from := utils.Sanitize(c.Query("from"), "alpha")
to := utils.Sanitize(c.Query("to"), "alpha")
text := c.Query("text")
if engine == "" && from == "" && to == "" && text == ""{
if engine == "" && from == "" && to == "" && text == "" {
return fiber.NewError(fiber.StatusBadRequest, "from, to, engine, text are required query strings.")
}
var err error