Log for db
This commit is contained in:
parent
f18afb4471
commit
d8f93c04c0
|
@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
|
||||||
"INSERT INTO arrowclicked(exp_id, arrow_id, time) VALUES($1,$2, to_timestamp($3));",
|
"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],
|
[req.session.exp_id, req.body.arrow_id, req.body.time],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
|
||||||
"INSERT INTO coinclicked(exp_id, coin_id, time) VALUES($1,$2, to_timestamp($3));",
|
"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],
|
[req.session.exp_id, req.body.coin_id, req.body.time],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -8,6 +8,8 @@ module.exports.index = function(req, res) {
|
||||||
"INSERT INTO fpscounter(exp_id, fps) VALUES($1,$2);",
|
"INSERT INTO fpscounter(exp_id, fps) VALUES($1,$2);",
|
||||||
[req.session.exp_id, req.body.fps],
|
[req.session.exp_id, req.body.fps],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -14,6 +14,8 @@ module.exports.index = function(req, res) {
|
||||||
req.body.arrow_id
|
req.body.arrow_id
|
||||||
],
|
],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -20,6 +20,8 @@ module.exports.index = function(req, res) {
|
||||||
req.body.time
|
req.body.time
|
||||||
],
|
],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -19,6 +19,8 @@ module.exports.index = function(req, res) {
|
||||||
req.body.camera.target.z
|
req.body.camera.target.z
|
||||||
],
|
],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -12,6 +12,8 @@ module.exports.index = function(req, res) {
|
||||||
req.body.time
|
req.body.time
|
||||||
],
|
],
|
||||||
function(err, result) {
|
function(err, result) {
|
||||||
|
if (err !== null)
|
||||||
|
console.log("[DBERROR] " + err);
|
||||||
release();
|
release();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue