manager/ui/handler/get_index.go

21 lines
326 B
Go
Raw Normal View History

2022-05-22 14:56:45 +02:00
package handler
import (
2023-11-12 17:33:36 +01:00
"github.com/flosch/pongo2/v6"
2022-05-22 14:56:45 +02:00
"github.com/gin-gonic/gin"
)
func GETIndex(cx *gin.Context) {
ctx := make(pongo2.Context)
type Data struct {
Target string
Message string
}
ctx["data"] = &Data{
Target: "World",
Message: "It's a great day to be alive",
}
cx.HTML(200, "index", ctx)
}