From 00e3f569fe13ada1a94e19aa95a487514b8bdb20 Mon Sep 17 00:00:00 2001 From: Daniel Asher Resnick Date: Tue, 28 Feb 2023 19:59:45 -0600 Subject: [PATCH] Increase information in burning-service debugging --- src/public/js/burning-service.js | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/public/js/burning-service.js b/src/public/js/burning-service.js index 4891833..fb37d93 100644 --- a/src/public/js/burning-service.js +++ b/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); }); }; }