package comments import ( "git.aiterp.net/rpdata/api/models" "github.com/globalsign/mgo/bson" ) // Remove removes one comment. func Remove(comment models.Comment) error { return collection.RemoveId(comment.ID) } // RemoveChapter removes all comments for the given chapter. func RemoveChapter(chapter models.Chapter) error { _, err := collection.RemoveAll(bson.M{"chapterId": chapter.ID}) return err }