fix(be): return empty array instead of nil for BoltDB

This commit is contained in:
Denis Gukov 2022-11-09 23:00:35 +05:00
parent 857000e9ac
commit 1139e35ce1
2 changed files with 2 additions and 0 deletions

Binary file not shown.

View File

@ -29,6 +29,8 @@ func (d *BoltDb) getEvents(c enumerable, params db.RetrieveQueryParams, filter f
i := 0 // offset counter i := 0 // offset counter
n := 0 // number of added items n := 0 // number of added items
events = []db.Event{}
for k, v := c.First(); k != nil; k, v = c.Next() { for k, v := c.First(); k != nil; k, v = c.Next() {
if params.Offset > 0 && i < params.Offset { if params.Offset > 0 && i < params.Offset {
i++ i++