go-ssb-room/web/router/complete.go

26 lines
562 B
Go
Raw Normal View History

2021-02-04 10:36:02 +00:00
package router
2021-02-08 11:57:14 +00:00
import (
"github.com/gorilla/mux"
)
2021-02-04 10:36:02 +00:00
// constant names for the named routes
const (
CompleteIndex = "complete:index"
CompleteAbout = "complete:about"
2021-02-04 10:36:02 +00:00
)
// CompleteApp constructs a mux.Router containing the routes for batch Complete html frontend
func CompleteApp() *mux.Router {
m := mux.NewRouter()
Auth(m.PathPrefix("/auth").Subrouter())
2021-02-08 11:57:14 +00:00
Admin(m.PathPrefix("/admin").Subrouter())
2021-02-04 10:36:02 +00:00
News(m.PathPrefix("/news").Subrouter())
m.Path("/").Methods("GET").Name(CompleteIndex)
m.Path("/about").Methods("GET").Name(CompleteAbout)
return m
}