Commit 614cbdd4 authored by ligaishun's avatar ligaishun

Update node.go

parent 9140cd0b
......@@ -169,9 +169,15 @@ func UpdateDetail(c* gin.Context){
//get current version and latest version
func Version(c* gin.Context){
appG := app.Gin{C: c}
setting.FreshVersion()
latestVersion:=app.GetLatestVersion()
if latestVersion==""{
appG.Response(http.StatusOK,e.ERROR,"network error,please try again")
return
}
appG.Response(http.StatusOK,e.SUCCESS,gin.H{
"current":setting.BityuanSetting.Version,
"latest" :app.GetLatestVersion(),
"latest" :latestVersion,
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment