Add rm command to delete results

This commit is contained in:
Arturo Filastò 2018-09-18 09:54:27 +02:00
commit 47a2fbb88c
4 changed files with 61 additions and 0 deletions

View file

@ -122,6 +122,9 @@ func DeleteResult(sess sqlbuilder.Database, resultID int64) error {
var result Result
res := sess.Collection("results").Find("result_id", resultID)
if err := res.One(&result); err != nil {
if err == db.ErrNoMoreRows {
return err
}
log.WithError(err).Error("error in obtaining the result")
return err
}