mirror of
https://codeberg.org/aryak/mozhi
synced 2024-11-17 00:32:59 +05:30
30 lines
562 B
Go
30 lines
562 B
Go
package pages
|
|
|
|
import (
|
|
"fmt"
|
|
"runtime"
|
|
|
|
"codeberg.org/aryak/mozhi/utils"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func HandleIndex(c *fiber.Ctx) error {
|
|
// 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")
|
|
}
|
|
|
|
return c.Render("index", fiber.Map{
|
|
"host": c.Hostname(),
|
|
"version": utils.Version(),
|
|
"fiberversion": fiber.Version,
|
|
"goversion": runtime.Version(),
|
|
})
|
|
}
|