Added benchmarks routes and views

This commit is contained in:
Gregory Ballantine
2024-05-29 09:11:13 -04:00
parent 95fe5ab400
commit ba06a2ea4c
7 changed files with 176 additions and 6 deletions

View File

@ -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) {