added some install files
This commit is contained in:
20
ui/handler/get_index.go
Normal file
20
ui/handler/get_index.go
Normal file
@ -0,0 +1,20 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"github.com/flosch/pongo2/v5"
|
||||
"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)
|
||||
|
||||
}
|
11
ui/handler/vars.go
Normal file
11
ui/handler/vars.go
Normal file
@ -0,0 +1,11 @@
|
||||
package handler
|
||||
|
||||
import "code.icod.de/postfix/manager/ent"
|
||||
|
||||
var (
|
||||
client *ent.Client
|
||||
)
|
||||
|
||||
func SetClient(c *ent.Client) {
|
||||
client = c
|
||||
}
|
Reference in New Issue
Block a user