This is an automated email from the ASF dual-hosted git repository.

kittohoward pushed a commit to branch statusRPC
in repository https://gitbox.apache.org/repos/asf/incubator-milagro-dta.git

commit 68e6a5eee3a0f94e8c6e10f00124252f348b8c4f
Author: howardkitto <[email protected]>
AuthorDate: Mon Sep 16 11:08:44 2019 +0100

    added status client with token header
---
 pkg/api/client.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pkg/api/client.go b/pkg/api/client.go
index e16f56e..74fdfdc 100644
--- a/pkg/api/client.go
+++ b/pkg/api/client.go
@@ -102,10 +102,12 @@ func (c MilagroClientService) FulfillOrderSecret(req 
*FulfillOrderSecretRequest)
 }
 
 //Status - Allows a client to see the status of the server that it is 
connecting too
-func (c MilagroClientService) Status() (*StatusResponse, error) {
+func (c MilagroClientService) Status(token string) (*StatusResponse, error) {
        endpoint := c.endpoints["Status"]
-       
-       s, err := endpoint(context.Background(), nil)
+       ctx := context.Background()
+       ctx = transport.SetJWTAuthHeader(ctx, token)
+
+       s, err := endpoint(ctx, nil)
        if err != nil {
                return nil, err
        }

Reply via email to