Improve user operations

Resolve #2197
Resolve #3367
This commit is contained in:
syuilo 2018-11-23 08:01:14 +09:00
parent 13a75abc91
commit 246cead2b1
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
19 changed files with 404 additions and 63 deletions

View file

@ -633,6 +633,9 @@ function saveReply(reply: INote, note: INote) {
function incNotesCountOfUser(user: IUser) {
User.update({ _id: user._id }, {
$set: {
updatedAt: new Date()
},
$inc: {
notesCount: 1
}