Allow setting of ARM API version via query param (#241)

This commit is contained in:
Steve Faulkner
2020-10-02 10:45:32 -05:00
committed by GitHub
parent 0ad5fb465b
commit 3112cf5573
2 changed files with 7 additions and 1 deletions

View File

@@ -25,6 +25,7 @@ interface ConfigContext {
GITHUB_CLIENT_ID: string;
GITHUB_CLIENT_SECRET?: string; // No need to inject secret for prod. Juno already knows it.
hostedExplorerURL: string;
armAPIVersion?: string;
}
// Default configuration
@@ -93,6 +94,10 @@ export async function initializeConfiguration(): Promise<ConfigContext> {
}
// Allow override of platform value with URL query parameter
const params = new URLSearchParams(window.location.search);
if (params.has("armAPIVersion")) {
const armAPIVersion = params.get("armAPIVersion") || "";
updateConfigContext({ armAPIVersion });
}
if (params.has("platform")) {
const platform = params.get("platform");
switch (platform) {