admin/api: use gorilla/mux instead of Go router
This commit is contained in:
parent
3e74f5f9ef
commit
173dafa69e
18 changed files with 643 additions and 720 deletions
11
admin/api/version.go
Normal file
11
admin/api/version.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package api
|
||||
|
||||
import ()
|
||||
|
||||
func init() {
|
||||
router.Path("/version").Methods("GET").HandlerFunc(apiHandler(showVersion))
|
||||
}
|
||||
|
||||
func showVersion(args map[string]string, body []byte) (interface{}, error) {
|
||||
return map[string]interface{}{"version": 0.1}, nil
|
||||
}
|
||||
Reference in a new issue