✨ feat(gvg): 激战期挑战相关接口整理
This commit is contained in:
@@ -13,7 +13,7 @@ class TeamInfo {
|
||||
teamCode: string; // 玩家队伍唯一标识
|
||||
|
||||
@prop({ required: true })
|
||||
teamId: number; // 队伍id,1-3,玩家的第几个队伍
|
||||
index: number; // 队伍id,1-3,玩家的第几个队伍
|
||||
|
||||
@prop({ required: true })
|
||||
leagueCode: string; // 联军
|
||||
@@ -62,7 +62,7 @@ export default class GVGBattleRec extends BaseModel {
|
||||
|
||||
public static async createRec(attackTeam: GVGTeamType, defenseTeam: GVGTeamType) {
|
||||
const battleCode = genCode(8);
|
||||
const result: GVGBattleRecType = await GVGBattleRecModel.findOneAndUpdate({ battleCode }, { $set: { attackTeam, defenseTeam, isSuccess: false } }).lean();
|
||||
const result: GVGBattleRecType = await GVGBattleRecModel.findOneAndUpdate({ battleCode }, { $set: { attackTeam, defenseTeam, isSuccess: false } }, { new: true, upsert: true }).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user