Skip to content
Snippets Groups Projects
Commit e5f71b24 authored by Gospodin Bodurov's avatar Gospodin Bodurov
Browse files

Fix build

parent 488dd84b
No related branches found
No related tags found
1 merge request!54Smime reflector
......@@ -25,6 +25,7 @@ import (
"code.vereign.com/code/viam-apis/clientutils"
"code.vereign.com/code/key-storage-agent/config"
keyutils "code.vereign.com/code/key-storage-agent/utils"
"code.vereign.com/code/viam-apis/authentication"
"code.vereign.com/code/viam-apis/key-storage-agent/api"
......@@ -106,7 +107,7 @@ func (s *KeyStorageServerImpl) GetKey(ctx context.Context, in *api.GetKeyRequest
getKeyResponse.Key = nil
getKeyResponse.StatusList = utils.AddStatus(getKeyResponse.StatusList,
"500", api.StatusType_ERROR, err.Error())
return getKeyResponse, err.Error()
return getKeyResponse, err
}
if errorsString != "" {
......@@ -121,7 +122,7 @@ func (s *KeyStorageServerImpl) GetKey(ctx context.Context, in *api.GetKeyRequest
getKeyResponse.Key = nil
getKeyResponse.StatusList = utils.AddStatus(getKeyResponse.StatusList,
"500", api.StatusType_ERROR, err.Error())
return getKeyResponse, err.Error()
return getKeyResponse, err
}
getKeyResponse.Key = key
......@@ -151,13 +152,13 @@ func (s *KeyStorageServerImpl) SetKey(ctx context.Context, in *api.SetKeyRequest
key := &api.Key{}
if ReplaceKey == false {
if config.ReplaceKey == false {
_, _, err := client.GetData("keys", in.Uuid+"/"+api.KeyType.String(in.KeyType), key)
if err != nil {
log.Printf("grpc call GetData to DataStorage failed: %s", err)
setKeyResponse.StatusList = utils.AddStatus(setKeyResponse.StatusList,
"500", api.StatusType_ERROR, err.Error())
return setKeyResponse, err.Error()
return setKeyResponse, err
}
if len(key.Content) > 0 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment