训练场宝箱展示bug
This commit is contained in:
@@ -104,6 +104,13 @@ export default class GuildTrain extends BaseModel {
|
||||
const result: GuildTrainType[] = await GuildTrainModel.find({guildCode, 'trainInstances.endTime':{$gte: nowSeconds()}, locked: false});
|
||||
return result;
|
||||
}
|
||||
|
||||
public static async removeTrainRank(guildCode: string, roleId: string, trainId: number, locked = false, lean = true) {
|
||||
const guildTrain: GuildTrainType = await GuildTrainModel.findOneAndUpdate({ guildCode, trainId, locked },
|
||||
{ $pull:{ ranks: { roleId } }}, {new: true}).lean(lean);
|
||||
return guildTrain;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user