3d-interface/posts/fps/index.js

21 lines
558 B
JavaScript
Raw Normal View History

2015-06-22 09:41:59 +02:00
var pg = require('pg');
var secret = require('../../private');
module.exports.index = function(req, res) {
pg.connect(secret.url, function(err, client, release) {
client.query(
"INSERT INTO fpscounter(exp_id, fps) VALUES($1,$2);",
[req.session.exp_id, req.body.fps],
function(err, result) {
2015-07-01 11:31:44 +02:00
if (err !== null)
console.log("[DBERROR] " + err);
2015-06-22 09:41:59 +02:00
release();
}
);
});
res.setHeader('Content-Type', 'text/html');
res.send("");
};