演武台:鼓舞次数未更新
This commit is contained in:
@@ -117,7 +117,7 @@ export default class BossInstance extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async encourage(code: string, count: number, maxCount: number) {
|
public static async encourage(code: string, count: number, maxCount: number) {
|
||||||
const rec: BossInstanceType = await BossInstanceModel.findOneAndUpdate({ code, encourageCnt: { $lte: maxCount - count } }, { $inc: { encourageCnt: count } }).lean();
|
const rec: BossInstanceType = await BossInstanceModel.findOneAndUpdate({ code, encourageCnt: { $lte: maxCount - count } }, { $inc: { encourageCnt: count } }, { new: true }).lean();
|
||||||
return rec
|
return rec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user