Fix secret text lookup

master
Marcus Noble 3 years ago
parent 7a05c11aa9
commit 36cd74f70f
  1. 4
      internal/onepassword/client.go
  2. 2
      internal/onepassword/response_types.go

@ -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

@ -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"`
}

Loading…
Cancel
Save