posts, counter: Fixed post positions issues when a post is deleted.
the build was successful

This commit is contained in:
2018-12-02 21:27:50 +01:00
parent 31239330df
commit ac2b79e88a
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ func NextMany(category, name string, increment int) (int, error) {
doc := counter{}
_, err := collection.Find(bson.M{"_id": id}).Apply(mgo.Change{
Update: bson.M{"$inc": bson.M{"value": 1}},
Update: bson.M{"$inc": bson.M{"value": increment}},
Upsert: true,
ReturnNew: true,
}, &doc)