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