Skip to content

Commit 77134de

Browse files
committed
expose additional fields
1 parent 8f3f1be commit 77134de

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

pkg/enpass/card.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"crypto/aes"
55
"crypto/cipher"
66
"encoding/hex"
7-
"github.com/pkg/errors"
87
"strings"
8+
9+
"github.com/pkg/errors"
910
)
1011

1112
/*
@@ -71,6 +72,8 @@ type Card struct {
7172
Category string
7273
Label string
7374
LastUsed int64
75+
Sensitive bool
76+
Icon string
7477

7578
// encrypted
7679
value string

pkg/enpass/vault.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ func (v *Vault) GetEntries(cardType string, filters []string) ([]Card, error) {
194194
rows, err := v.db.Query(`
195195
SELECT uuid, type, created_at, field_updated_at, title,
196196
subtitle, note, trashed, item.deleted, category,
197-
label, value, key, last_used
197+
label, value, key, last_used, sensitive, item.icon
198198
FROM item
199199
INNER JOIN itemfield ON uuid = item_uuid
200200
`)
@@ -212,7 +212,7 @@ func (v *Vault) GetEntries(cardType string, filters []string) ([]Card, error) {
212212
if err := rows.Scan(
213213
&card.UUID, &card.Type, &card.CreatedAt, &card.UpdatedAt, &card.Title,
214214
&card.Subtitle, &card.Note, &card.Trashed, &card.Deleted, &card.Category,
215-
&card.Label, &card.value, &card.itemKey, &card.LastUsed,
215+
&card.Label, &card.value, &card.itemKey, &card.LastUsed, &card.Sensitive, &card.Icon,
216216
); err != nil {
217217
return nil, errors.Wrap(err, "could not read card from database")
218218
}

0 commit comments

Comments
 (0)