This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package posts
|
||||
|
||||
import (
|
||||
"git.aiterp.net/rpdata/api/internal/counter"
|
||||
"git.aiterp.net/rpdata/api/models"
|
||||
"github.com/globalsign/mgo/bson"
|
||||
)
|
||||
@@ -20,6 +21,8 @@ func Remove(post models.Post) (models.Post, error) {
|
||||
return models.Post{}, err
|
||||
}
|
||||
|
||||
counter.NextMany("next_post_id", post.LogID, -1)
|
||||
|
||||
return post, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user