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:
+3
-9
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user