dbweb/actions/home.go
lunny c23c3965ad
All checks were successful
continuous-integration/drone/push Build is passing
use go mod & add drone (#15)
2019-06-06 02:43:18 +00:00

30 lines
465 B
Go

package actions
import (
"gitea.com/xorm/dbweb/models"
"gitea.com/tango/renders"
"github.com/go-xorm/core"
)
type Home struct {
AuthRenderBase
}
func (c *Home) Get() error {
engines, err := models.FindEngines()
if err != nil {
return err
}
return c.Render("root.html", renders.T{
"engines": engines,
"tables": []core.Table{},
"records": [][]string{},
"columns": []string{},
"id": 0,
"ishome": true,
"IsLogin": c.IsLogin(),
})
}