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
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