Added benchmarks routes and views
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user