api: add version info
This commit is contained in:
parent
6d60e29ddf
commit
54a104dc72
|
@ -0,0 +1,17 @@
|
|||
package api
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
func init() {
|
||||
router.GET("/api/version", apiHandler(showVersion))
|
||||
}
|
||||
|
||||
func showVersion(_ httprouter.Params, _ io.Reader) Response {
|
||||
return APIResponse{
|
||||
response: map[string]interface{}{"version": 0.1},
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue