admin/api: use gorilla/mux instead of Go router

This commit is contained in:
nemunaire 2016-12-08 09:12:18 +01:00 committed by Pierre-Olivier Mercier
parent 0e30259b7e
commit 307c253d7a
18 changed files with 643 additions and 720 deletions

14
admin/api/router.go Normal file
View 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
}