14 lines
283 B
Go
14 lines
283 B
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"github.com/julienschmidt/httprouter"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
router.GET("/api/version", apiHandler(showVersion))
|
||
|
}
|
||
|
|
||
|
func showVersion(u QAUser, _ httprouter.Params, body []byte) (interface{}, error) {
|
||
|
return map[string]interface{}{"version": 0.1, "auth": u}, nil
|
||
|
}
|