admin/api: use gorilla/mux instead of Go router
This commit is contained in:
parent
e2593e5f24
commit
972503292d
18 changed files with 644 additions and 721 deletions
14
admin/api/router.go
Normal file
14
admin/api/router.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
var api_router = mux.NewRouter().StrictSlash(true)
|
||||
|
||||
var router = api_router.PathPrefix("/api/").Subrouter()
|
||||
|
||||
|
||||
func Router() *mux.Router {
|
||||
return api_router
|
||||
}
|
||||
Reference in a new issue