admin/api: use gorilla/mux instead of Go router
This commit is contained in:
parent
0e30259b7e
commit
307c253d7a
18 changed files with 643 additions and 720 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