diff options
Diffstat (limited to 'internal')
-rw-r--r-- | internal/storer/storer.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/storer/storer.go b/internal/storer/storer.go index b8b4ffd..99da8b8 100644 --- a/internal/storer/storer.go +++ b/internal/storer/storer.go @@ -65,7 +65,11 @@ func (s *Store) IsEncrypted(id string) (bool, error) { var encrypted bool return encrypted, s.db.View(func(txn *badger.Txn) error { - value, err := txn.Get([]byte(id)) + uid, err := xid.FromString(id) + if err != nil { + return err + } + value, err := txn.Get(uid.Bytes()) if err != nil { return err } |