Fixed runtime error with invalid function
This commit is contained in:
parent
d09b431932
commit
831f1e17cf
1 changed files with 1 additions and 4 deletions
|
|
@ -41,10 +41,7 @@ async function EditAnswerAccepted(req, res) {
|
|||
operation: 'increment',
|
||||
amount: 15,
|
||||
});
|
||||
await User.findByOneAndUpdate(
|
||||
{ username: cachedAnswer.creator },
|
||||
{ $inc: { points: 15 } }
|
||||
);
|
||||
await User.findOneAndUpdate({ username: cachedAnswer.creator }, { $inc: { points: 15 } });
|
||||
|
||||
return res.sendStatus(200);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue