Add _id and _read for mark_as_read handling

This commit is contained in:
Peter Stuifzand 2018-04-07 02:08:31 +02:00
parent cbd6e7dd84
commit d374cd15d6
2 changed files with 9 additions and 0 deletions

View File

@ -185,6 +185,13 @@ func mapToItem(result map[string]interface{}) microsub.Item {
item.Updated = updated.(string)
}
if id, e := result["_id"]; e {
item.Id = id.(string)
}
if read, e := result["_read"]; e {
item.Read = read.(string)
}
return item
}

View File

@ -67,6 +67,8 @@ type Item struct {
Content Content `json:"content,omitempty"`
Latitude string `json:"latitude,omitempty"`
Longitude string `json:"longitude,omitempty"`
Id string `json:"_id"`
Read string `json:"_read"`
}
// Pagination contains information about paging