Fix minor issue in database api

This commit is contained in:
Daniel 2019-01-11 22:18:46 +01:00
parent 1ef3ceb274
commit a943e3315f

View file

@ -329,9 +329,10 @@ func (api *DatabaseAPI) processSub(opID []byte, sub *database.Subscription) {
r.Unlock()
if err != nil {
api.send(opID, dbMsgTypeWarning, err.Error(), nil)
continue
}
// TODO: use upd, new and delete msgTypes
if r.Meta().Deleted > 0 {
if r.Meta().IsDeleted() {
api.send(opID, dbMsgTypeDel, r.Key(), nil)
} else {
api.send(opID, dbMsgTypeUpd, r.Key(), data)