NotifyResult doesnt return error field if success
This commit is contained in:
parent
9efed591da
commit
d22cdc5cbb
|
@ -378,15 +378,13 @@ func makeJSONResponse(err error) *C.char {
|
|||
func Notify(token *C.char) *C.char {
|
||||
err := statusAPI.Notify(C.GoString(token))
|
||||
|
||||
res := true
|
||||
errString := ""
|
||||
if err != nil {
|
||||
res = false
|
||||
errString = err.Error()
|
||||
}
|
||||
|
||||
out := common.NotifyResult{
|
||||
Status: res,
|
||||
Status: err == nil,
|
||||
Error: errString,
|
||||
}
|
||||
|
||||
|
|
|
@ -398,7 +398,7 @@ type TestConfig struct {
|
|||
// NotifyResult is a JSON returned from notify message
|
||||
type NotifyResult struct {
|
||||
Status bool `json:"status"`
|
||||
Error string `json:"error"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
// LoadTestConfig loads test configuration values from disk
|
||||
|
|
Loading…
Reference in New Issue