Added benchmarks routes and views

This commit is contained in:
2025-07-14 13:53:50 -04:00
parent bee64576bc
commit fde8d1dee4
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) {