simplify call to peer
This commit is contained in:
		| @@ -80,9 +80,9 @@ func (a *API) CheckRemotePeer(url string) (State, map[string]int) { | ||||
| 	return ToState(resp.Data.State), new | ||||
| } | ||||
|  | ||||
| func (a *API) CheckRemoteAPIs(urls map[string]string) (State, map[string]int, error) { | ||||
| func (a *API) CheckRemoteAPIs(urls map[string]string) (State, map[string]string, error) { | ||||
| 	// Check if the database is up | ||||
| 	new := map[string]int{} | ||||
| 	new := map[string]string{} | ||||
| 	caller := NewHTTPCaller(map[string]map[METHOD]string{}) | ||||
| 	for appName, url := range urls { | ||||
| 		var resp APIStatusResponse | ||||
| @@ -94,7 +94,7 @@ func (a *API) CheckRemoteAPIs(urls map[string]string) (State, map[string]int, er | ||||
| 		if resp.Data == nil { | ||||
| 			return DEAD, new, errors.New(url + " -> is DEAD") | ||||
| 		} | ||||
| 		new[appName] = ToState(resp.Data.State).EnumIndex() | ||||
| 		new[appName] = resp.Data.State | ||||
| 		if resp.Data.Code != 0 { | ||||
| 			return REDUCED_SERVICE, new, errors.New(url + " -> " + resp.Error) | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user