Log for db

This commit is contained in:
Thomas FORGIONE 2015-07-01 11:31:44 +02:00
parent f18afb4471
commit d8f93c04c0
7 changed files with 14 additions and 0 deletions

View File

@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
"INSERT INTO arrowclicked(exp_id, arrow_id, time) VALUES($1,$2, to_timestamp($3));",
[req.session.exp_id, req.body.arrow_id, req.body.time],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
"INSERT INTO coinclicked(exp_id, coin_id, time) VALUES($1,$2, to_timestamp($3));",
[req.session.exp_id, req.body.coin_id, req.body.time],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
"INSERT INTO fpscounter(exp_id, fps) VALUES($1,$2);",
[req.session.exp_id, req.body.fps],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -14,6 +14,8 @@ module.exports.index = function(req, res) {
req.body.arrow_id
],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -20,6 +20,8 @@ module.exports.index = function(req, res) {
req.body.time
],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -19,6 +19,8 @@ module.exports.index = function(req, res) {
req.body.camera.target.z
],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);

View File

@ -12,6 +12,8 @@ module.exports.index = function(req, res) {
req.body.time
],
function(err, result) {
if (err !== null)
console.log("[DBERROR] " + err);
release();
}
);