✨ feat(录像): 修改录像上传逻辑
This commit is contained in:
@@ -65,6 +65,9 @@ export default class GVGVestigeRec extends BaseModel {
|
||||
@prop({ required: true, default: false })
|
||||
hasRpl: boolean; // 是否存在对应录像
|
||||
|
||||
@prop({ required: true, default: false })
|
||||
remoteUrl: string; // 录像文件
|
||||
|
||||
public static async createRec(configId: number, vestigeId: number, groupKey: string, warId: number, attackInfo: OppPlayerInfo, defenseInfo: OppPlayerInfo, leagueGoods: LeagueGood[]) {
|
||||
const battleCode = genCode(10);
|
||||
const result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, {
|
||||
@@ -110,8 +113,8 @@ export default class GVGVestigeRec extends BaseModel {
|
||||
}
|
||||
|
||||
|
||||
public static async updateRplStatus(battleCode: string, hasRpl: boolean) {
|
||||
let result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, { hasRpl }, { new: true }).lean();
|
||||
public static async updateRplStatus(battleCode: string, hasRpl: boolean, remoteUrl: string) {
|
||||
let result: GVGVestigeRecType = await GVGVestigeRecModel.findOneAndUpdate({ battleCode }, { hasRpl, remoteUrl }, { new: true }).lean();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user