🐞 fix(gvg): 联军信息变动同步
This commit is contained in:
@@ -113,6 +113,13 @@ export default class GVGCity extends BaseModel {
|
||||
const cities: GVGCityType[] = await GVGCityModel.find({ configId, hasGuard: true }).lean();
|
||||
return cities
|
||||
}
|
||||
|
||||
public static async updateLeagueInfo(leagueCode: string, leagueName: string, icon: number) {
|
||||
let updateInfo: GVGCityUpdate = {};
|
||||
if(leagueName != undefined) updateInfo.guardLeagueName = leagueName;
|
||||
if(icon != undefined) updateInfo.guardLeagueIcon = icon;
|
||||
await GVGCityModel.updateMany({ guardLeague: leagueCode }, { $set: updateInfo });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user