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

@ -26,6 +26,20 @@ func RegisterRoutes(f *flamego.Flame) {
f.Get("/{hardware_id}", routes.HardwareGetView)
})
// benchmark routes
f.Group("/benchmark", func() {
f.Get("", func(c flamego.Context) {
c.Redirect("/benchmark/list")
})
f.Get("/list", routes.BenchmarkGetList)
f.Get("/create", routes.BenchmarkGetCreate)
f.Post("/create", binding.Form(forms.BenchmarkForm{}), routes.BenchmarkPostCreate)
f.Get("/{benchmark_id}", routes.BenchmarkGetView)
})
// test routes
f.Group("/test", func() {
f.Get("", func(c flamego.Context) {