reworked config to dynamically adjust to staging or master config value (2nd version aftert 1st lost)

This commit is contained in:
zino
2021-05-23 12:42:35 +02:00
parent 6d40613e64
commit 8a1ce5ad03
10 changed files with 151 additions and 73 deletions

View File

@@ -1,4 +1,5 @@
import * as I from "../types/types";
import { config } from "./config";
export default class Utils {
@@ -98,4 +99,10 @@ export default class Utils {
if (process.env["NODE_ENV"] === "development")
console.log(inMessage);
}
static getConfigValue(inProperty: I.TypeConfigResourcesProperty): string {
const branch: I.TypeConfigBranch = config.branch;
const resources = config.resources[branch];
return resources[inProperty];
}
}