cleanup warnings

This commit is contained in:
stremovsky
2020-01-07 12:47:28 +02:00
parent dbbdd4e7c8
commit 9bed541921
5 changed files with 33 additions and 4 deletions

View File

@@ -102,6 +102,9 @@ func (dbobj dbcon) getAuditEvents(userTOKEN string, offset int32, limit int32) (
}
var results []bson.M
records, err := dbobj.getList(TblName.Audit, "record", userTOKEN, offset, limit)
if err != nil {
return nil, 0, err
}
for _, element := range records {
element["more"] = false
if _, ok := element["before"]; ok {
@@ -119,7 +122,7 @@ func (dbobj dbcon) getAuditEvents(userTOKEN string, offset int32, limit int32) (
results = append(results, element)
}
resultJSON, err := json.Marshal(records)
resultJSON, _ := json.Marshal(records)
//fmt.Printf("Found multiple documents (array of pointers): %+v\n", results)
return resultJSON, count, nil
}