Added benchmarks routes and views
This commit is contained in:
@ -15,13 +15,13 @@ import (
|
||||
)
|
||||
|
||||
func HardwareGetList(t template.Template, data template.Data) {
|
||||
// add hardwares to template
|
||||
var hardware []models.Hardware
|
||||
models.DB.First(&hardware)
|
||||
data["hardware"] = hardware
|
||||
// add benchmarks to template
|
||||
var benchmarks []models.Benchmark
|
||||
models.DB.First(&benchmarks)
|
||||
data["benchmarks"] = benchmarks
|
||||
|
||||
data["title"] = "List of Hardware"
|
||||
t.HTML(http.StatusOK, "hardware/list")
|
||||
data["title"] = "List of Benchmarks"
|
||||
t.HTML(http.StatusOK, "benchmark/list")
|
||||
}
|
||||
|
||||
func HardwareGetView(c flamego.Context, t template.Template, data template.Data) {
|
||||
|
Reference in New Issue
Block a user