mozhi/pages/index.go

30 lines
562 B
Go
Raw Normal View History

2023-06-25 00:10:57 +05:30
package pages
import (
2023-07-22 19:54:15 +05:30
"fmt"
"runtime"
2023-08-27 19:54:30 +05:30
"codeberg.org/aryak/mozhi/utils"
"github.com/gofiber/fiber/v2"
2023-06-25 00:10:57 +05:30
)
func HandleIndex(c *fiber.Ctx) error {
2023-07-22 19:54:15 +05:30
// Check if all required queries are present
m := c.Queries()
sl, _ := m["sl"]
tl, _ := m["tl"]
engine, _ := m["engine"]
text, _ := m["text"]
if sl != "" && tl != "" && engine != "" && text != "" {
fmt.Println("Work")
}
2023-06-25 00:10:57 +05:30
return c.Render("index", fiber.Map{
"host": c.Hostname(),
"version": utils.Version(),
"fiberversion": fiber.Version,
"goversion": runtime.Version(),
})
}