Merge PR #1252: Query node version

introduce non store queries
add version query
update lcd spec
changelog
moved version query into baseapp
This commit is contained in:
Fabian
2018-06-14 07:49:21 +02:00
committed by Christopher Goes
parent cc11bd22b2
commit 42e72956f4
14 changed files with 84 additions and 26 deletions
+3 -9
View File
@@ -2,7 +2,6 @@ package version
import (
"fmt"
"net/http"
"github.com/spf13/cobra"
)
@@ -16,7 +15,8 @@ var (
}
)
func getVersion() string {
// return version of CLI/node and commit hash
func GetVersion() string {
v := Version
if GitCommit != "" {
v = v + "-" + GitCommit
@@ -26,12 +26,6 @@ func getVersion() string {
// CMD
func printVersion(cmd *cobra.Command, args []string) {
v := getVersion()
v := GetVersion()
fmt.Println(v)
}
// version REST handler endpoint
func RequestHandler(w http.ResponseWriter, r *http.Request) {
v := getVersion()
w.Write([]byte(v))
}