add feature flags for new pages
This commit is contained in:
parent
f63214264a
commit
bf2672cc94
6 changed files with 38 additions and 8 deletions
|
|
@ -191,13 +191,19 @@ export class Armory {
|
|||
await charsController.load();
|
||||
app.get("/character/:realm/:name", this.wrapRoute(charsController.character.bind(charsController)));
|
||||
app.get("/character/:realm/:name/talents", this.wrapRoute(charsController.talents.bind(charsController)));
|
||||
app.get("/character/:realm/:name/skills", this.wrapRoute(charsController.skills.bind(charsController)));
|
||||
if (this.config.featureFlags.enableSkillsPage) {
|
||||
app.get("/character/:realm/:name/skills", this.wrapRoute(charsController.skills.bind(charsController)));
|
||||
}
|
||||
app.get("/character/:realm/:name/achievements", this.wrapRoute(charsController.achievements.bind(charsController)));
|
||||
app.get("/character/:realm/:character/achievements/data", this.wrapRoute(charsController.achievementsData.bind(charsController)));
|
||||
app.get("/character/:realm/:name/pvp", this.wrapRoute(charsController.pvp.bind(charsController)));
|
||||
app.get("/character/:realm/:name/reputation", this.wrapRoute(charsController.reputation.bind(charsController)));
|
||||
app.get("/character/:realm/:name/quests", this.wrapRoute(charsController.quests.bind(charsController)));
|
||||
app.get("/character/:realm/:name/quests/compare/:otherRealm/:otherName", this.wrapRoute(charsController.questsCompare.bind(charsController)));
|
||||
if (this.config.featureFlags.enableReputationPage) {
|
||||
app.get("/character/:realm/:name/reputation", this.wrapRoute(charsController.reputation.bind(charsController)));
|
||||
}
|
||||
if (this.config.featureFlags.enableQuestsPage) {
|
||||
app.get("/character/:realm/:name/quests", this.wrapRoute(charsController.quests.bind(charsController)));
|
||||
app.get("/character/:realm/:name/quests/compare/:otherRealm/:otherName", this.wrapRoute(charsController.questsCompare.bind(charsController)));
|
||||
}
|
||||
|
||||
const guildsController = new GuildController(this);
|
||||
app.get("/guild/:realm/:name", this.wrapRoute(guildsController.guild.bind(guildsController)));
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ export interface IIframeModeConfig {
|
|||
url: string;
|
||||
}
|
||||
|
||||
export interface IFeatureFlags {
|
||||
enableQuestsPage: boolean;
|
||||
enableReputationPage: boolean;
|
||||
enableSkillsPage: boolean;
|
||||
}
|
||||
|
||||
export class Config {
|
||||
public aowowUrl: string;
|
||||
public wowheadUrl: string;
|
||||
|
|
@ -37,6 +43,7 @@ export class Config {
|
|||
public realms: IRealmConfig[];
|
||||
public worldDatabase: IDatabaseConfig;
|
||||
public dbQueryTimeout: number;
|
||||
public featureFlags: IFeatureFlags;
|
||||
|
||||
private static envPrefix = "ACORE_ARMORY";
|
||||
private static checkedMissingField = false;
|
||||
|
|
|
|||
|
|
@ -789,6 +789,9 @@ export class CharacterController {
|
|||
guild: charData.guild,
|
||||
zone: charData.zone,
|
||||
zoneName: this.getZoneName(charData.zone),
|
||||
enableQuestsPage: this.armory.config.featureFlags.enableQuestsPage,
|
||||
enableSkillsPage: this.armory.config.featureFlags.enableSkillsPage,
|
||||
enableReputationPage: this.armory.config.featureFlags.enableReputationPage
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue