1
0
mirror of https://github.com/elisspace/FxLifeSheet.git synced 2026-08-29 15:44:00 +00:00

Add debugging code for production

This commit is contained in:
Felix Krause
2021-11-04 17:06:34 +01:00
parent e55239feac
commit ddb9aebc78
2 changed files with 4 additions and 2 deletions

3
web.js
View File

@@ -5,7 +5,7 @@ var moment = require("moment");
var postgres = require("./classes/postgres.js");
var lastFetchedData = {};
function loadCurrentData(key) {
console.log("Refreshing latest moood entry...");
console.log("Refreshing latest " + key + " entry...");
var query;
if (key == "gym" || key == "meditated") {
query =
@@ -15,6 +15,7 @@ function loadCurrentData(key) {
query =
"SELECT * FROM raw_data WHERE key = $1 ORDER BY timestamp DESC LIMIT 1";
}
console.log(query);
postgres.client.query({
text: query,
values: [key]

3
web.ts
View File

@@ -9,7 +9,7 @@ let postgres = require("./classes/postgres.js");
var lastFetchedData = {};
function loadCurrentData(key) {
console.log("Refreshing latest moood entry...");
console.log(`Refreshing latest ${key} entry...`);
let query;
if (key == "gym" || key == "meditated") {
@@ -20,6 +20,7 @@ function loadCurrentData(key) {
"SELECT * FROM raw_data WHERE key = $1 ORDER BY timestamp DESC LIMIT 1";
}
console.log(query);
postgres.client.query(
{
text: query,