寻宝:增加设置情谊助战的接口
This commit is contained in:
@@ -144,6 +144,11 @@ export default class ComBattleTeam extends BaseModel {
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async updateRoleStFrd(teamCode: string, roleId: string, isFrd: boolean, lean = true) {
|
||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndUpdate({ teamCode, 'roleStatus.roleId': roleId }, { $set: {'roleStatus.$.isFrd': isFrd}}, {new: true}).lean(lean);
|
||||
return team;
|
||||
}
|
||||
|
||||
public static async removeTeam(teamCode: string, lean = true) {
|
||||
const team: ComBattleTeamType = await ComBattleTeamModel.findOneAndDelete({ teamCode }).lean(lean);
|
||||
return team;
|
||||
|
||||
Reference in New Issue
Block a user