Increase information in burning-service debugging

pull/11/head
Daniel Asher Resnick 2 years ago
parent c7306cbacf
commit 00e3f569fe
  1. 32
      src/public/js/burning-service.js

@ -274,8 +274,10 @@ function BurningDataService($http) {
this.whenStocksLoaded = fetch("/stocks")
.then((response) => response.json())
.then((data) => {
if(DEBUG)
console.log("Loaded stock data: "+data);
if(DEBUG) {
console.log("Loaded stock data:");
console.log(data);
}
myself.stocks = data;
for (var stock of Object.keys(data)) {
myself.startingStatPts[stock] = new StartingStatPoints(myself.stocks[stock].starting_stats);
@ -290,8 +292,10 @@ function BurningDataService($http) {
.then((response) => response.json())
.then((data) => {
myself.skills = data;
if(DEBUG)
console.log("Loaded skill data: "+data);
if(DEBUG) {
console.log("Loaded skill data:");
console.log(data);
}
})
.catch((error) => {
console.log("Error: Getting skills from server failed: "+error);
@ -302,8 +306,10 @@ function BurningDataService($http) {
.then((response) => response.json())
.then((data) => {
myself.traits = data;
if(DEBUG)
console.log("Loaded trait data: "+data);
if(DEBUG) {
console.log("Loaded trait data:");
console.log(data);
}
})
.catch((error) => {
console.log("Error: Getting traits from server failed: "+error);
@ -318,8 +324,10 @@ function BurningDataService($http) {
.then((response) => response.json())
.then((data) => {
myself.lifepaths[stock] = data;
if(DEBUG)
console.log("Loaded "+stock+" lifepaths. " + Object.keys(myself.lifepaths[stock]).length + " settings");
if(DEBUG) {
console.log("Loaded "+stock+" lifepaths:");
console.log(data);
}
})
.catch((error) => {
console.log("Error: Getting "+stock+" lifepaths from server failed: "+error);
@ -333,11 +341,13 @@ function BurningDataService($http) {
.then((response) => response.json())
.then((data) => {
myself.resources[stock] = data;
if(DEBUG)
console.log("Loaded "+stock+" resources. ");
if(DEBUG) {
console.log("Loaded "+stock+" resources:");
console.log(data);
}
})
.catch((error) => {
console.log("Error: Getting "+stock+" stat points from server failed: "+error);
console.log("Error: Getting "+stock+" resources from server failed: "+error);
});
};
}

Loading…
Cancel
Save