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 (
|
2021-02-09 11:39:57 +00:00
|
|
|
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
|
|
|
|
}
|