Fix secret text lookup

This commit is contained in:
Marcus Noble 2020-05-02 13:03:28 +01:00
parent 7a05c11aa9
commit 36cd74f70f
2 changed files with 3 additions and 3 deletions

View File

@ -106,8 +106,8 @@ func (op *Client) GetSecret(vault, secretID string) (*Secret, error) {
secret.Password = *item.Details.Password
}
if item.Details.Notes != nil {
secret.SecretText = *item.Details.Notes
if item.Details.Notes != "" {
secret.SecretText = item.Details.Notes
}
return secret, nil

View File

@ -11,7 +11,7 @@ type field struct {
type details struct {
Fields []field `json:"fields"`
Notes *string `json:"notesPlain;omitempty"`
Notes string `json:"notesPlain"`
Password *string `json:"password;omitempty"`
}