colossus/routes/index.go

19 lines
334 B
Go

package routes
import (
"net/http"
"github.com/flamego/template"
"git.metaunix.net/BitGoblin/colossus/models"
)
func getIndex(t template.Template, data template.Data) {
var hardware []models.Component
models.DB.Find(&hardware)
data["hardware"] = hardware
data["title"] = "Dashboard"
t.HTML(http.StatusOK, "index")
}