Skip to content

Commit ed8c2a7

Browse files
committed
only return secret string instead of details struct
1 parent 6389ea5 commit ed8c2a7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

service/client.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,10 @@ func (c *Client) Do(request Request) (string, error) {
8080
return "", fmt.Errorf("status %s, details %v", code, respErr.Error)
8181
}
8282

83-
return string(msg.Data), nil
83+
var resp ResponseMessage
84+
if err := json.Unmarshal(msg.Data, &resp); err != nil {
85+
return "", err
86+
}
87+
88+
return resp.Details, nil
8489
}

0 commit comments

Comments
 (0)