✨ feat(战场): 放宽上传录像范围
This commit is contained in:
@@ -81,6 +81,8 @@ export default class BattleRecord extends BaseModel {
|
|||||||
stars: number[]; // 达成星星
|
stars: number[]; // 达成星星
|
||||||
@prop({ required: true, _id: false })
|
@prop({ required: true, _id: false })
|
||||||
record: Record; // 使用的武将等记录
|
record: Record; // 使用的武将等记录
|
||||||
|
@prop({ required: false })
|
||||||
|
remoteUrl: string; // 录像文件地址
|
||||||
|
|
||||||
@prop({ required: true, default: 0 })
|
@prop({ required: true, default: 0 })
|
||||||
regretCnt: number; // 悔棋次数
|
regretCnt: number; // 悔棋次数
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ export default class GameController extends Controller {
|
|||||||
if (!battleRec) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_NOT_FOUND);
|
if (!battleRec) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_NOT_FOUND);
|
||||||
roleId = battleRec.roleId;
|
roleId = battleRec.roleId;
|
||||||
warType = battleRec.warType;
|
warType = battleRec.warType;
|
||||||
if (warType !== WAR_TYPE.PVP && warType !== WAR_TYPE.LADDER && warType !== WAR_TYPE.GVG_VESTIGE) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_NOT_SUPPORT);
|
// if (warType !== WAR_TYPE.PVP && warType !== WAR_TYPE.LADDER && warType !== WAR_TYPE.GVG_VESTIGE) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_NOT_SUPPORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
writePath = getLocalRplUrl(roleId, warType, battleCode);
|
writePath = getLocalRplUrl(roleId, warType, battleCode);
|
||||||
@@ -293,6 +293,8 @@ export default class GameController extends Controller {
|
|||||||
updateDBRes = await GVGVestigeRecModel.updateRplStatus(battleCode, true, remoteUrl);
|
updateDBRes = await GVGVestigeRecModel.updateRplStatus(battleCode, true, remoteUrl);
|
||||||
} else if (warType == WAR_TYPE.GVG_BATTLE) {
|
} else if (warType == WAR_TYPE.GVG_BATTLE) {
|
||||||
updateDBRes = await GVGBattleRecModel.updateRplStatus(battleCode, true, remoteUrl);
|
updateDBRes = await GVGBattleRecModel.updateRplStatus(battleCode, true, remoteUrl);
|
||||||
|
} else {
|
||||||
|
updateDBRes = await BattleRecordModel.updateBattleRecordByCode(battleCode, { $set: { remoteUrl }});
|
||||||
}
|
}
|
||||||
if (!updateDBRes) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_UPDATE_ERR);
|
if (!updateDBRes) return ctx.body = ctx.service.utils.resResult(STATUS.BATTLE_RPL_UPDATE_ERR);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user