Add _id and _read for mark_as_read handling
This commit is contained in:
parent
cbd6e7dd84
commit
d374cd15d6
|
|
@ -185,6 +185,13 @@ func mapToItem(result map[string]interface{}) microsub.Item {
|
||||||
item.Updated = updated.(string)
|
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
|
return item
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,8 @@ type Item struct {
|
||||||
Content Content `json:"content,omitempty"`
|
Content Content `json:"content,omitempty"`
|
||||||
Latitude string `json:"latitude,omitempty"`
|
Latitude string `json:"latitude,omitempty"`
|
||||||
Longitude string `json:"longitude,omitempty"`
|
Longitude string `json:"longitude,omitempty"`
|
||||||
|
Id string `json:"_id"`
|
||||||
|
Read string `json:"_read"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pagination contains information about paging
|
// Pagination contains information about paging
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user