Skip to content
Snippets Groups Projects
Commit 98def1ae authored by Jono Wenger's avatar Jono Wenger
Browse files

Fix storage for Contact

parent 8b0de77e
No related branches found
No related tags found
No related merge requests found
...@@ -20,15 +20,10 @@ const currentContactVersion = 0 ...@@ -20,15 +20,10 @@ const currentContactVersion = 0
func StoreContact(kv *versioned.KV, c contact.Contact) error { func StoreContact(kv *versioned.KV, c contact.Contact) error {
now := time.Now() now := time.Now()
data, err := c.Marshal()
if err != nil {
return err
}
obj := versioned.Object{ obj := versioned.Object{
Version: currentContactVersion, Version: currentContactVersion,
Timestamp: now, Timestamp: now,
Data: data, Data: c.Marshal(),
} }
return kv.Set(makeContactKey(c.ID), &obj) return kv.Set(makeContactKey(c.ID), &obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment