Skip to content
Snippets Groups Projects

16 refactor deprecated functions

Merged Olgun Cengiz requested to merge 16-refactor-deprecated-functions into master
All threads resolved!
Files
3
+ 3
6
@@ -28,7 +28,6 @@ import (
"code.vereign.com/code/viam-apis/authentication"
"code.vereign.com/code/viam-apis/key-storage-agent/api"
"code.vereign.com/code/viam-apis/utils"
"code.vereign.com/code/viam-apis/system"
"golang.org/x/net/context"
"google.golang.org/grpc/metadata"
)
@@ -237,11 +236,9 @@ func (s *KeyStorageServerImpl) GetKeyId(ctx context.Context, in *api.GetKeyIdByK
keyIdResponse := &api.GetKeyIdByKeyResponse{}
stringMessage := &system.String{}
hasData, errorsString, err := dataStorageClient.GetData(keyToKeyIdTable, in.PublicKey, stringMessage)
if err == nil && errorsString == "" && hasData {
keyIdResponse.KeyId = stringMessage.Value
keyId, errorsString, err := dataStorageClient.GetString(keyToKeyIdTable, in.PublicKey)
if err == nil && errorsString == "" && keyId != "" {
keyIdResponse.KeyId = keyId
return keyIdResponse, nil
} else {
if err != nil {
Loading