From 8d693ef54823ef747838c6377d050bd25183aa28 Mon Sep 17 00:00:00 2001 From: Joe Meiring Date: Wed, 4 Sep 2019 12:57:12 -0500 Subject: [PATCH] Changed the keys post request for updated tags syntax in the keys api --- tacc-keys/tacc-services/post_keys.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tacc-keys/tacc-services/post_keys.go b/tacc-keys/tacc-services/post_keys.go index 1e85d9a..eae8b67 100644 --- a/tacc-keys/tacc-services/post_keys.go +++ b/tacc-keys/tacc-services/post_keys.go @@ -12,11 +12,12 @@ import ( type payload struct { KeyValue string `json:"key_value"` - Tags []payloadTags `json:"tags"` + Tags []payloadTag `json:"tags"` } -type payloadTags struct { - Purpose string `json:"name"` +type payloadTag struct { + Name string `json:"name"` + Value string `json:"value"` } // PostUserPubKey posts a user's public key to the keys server. @@ -27,7 +28,7 @@ func PostUserPubKey(baseURL, accessToken, user, pubkey string, tag string) error // Request payload. data := payload{ KeyValue: pubkey, - Tags: []payloadTags{{Purpose: tag}}, + Tags: []payloadTag{{Name:"go-keys-client", Value: tag}}, } payloadBytes, err := json.Marshal(data) if err != nil {