WIP
This commit is contained in:
parent
7c15ce0ae8
commit
8734849511
4 changed files with 37 additions and 19 deletions
|
|
@ -78,6 +78,10 @@ function poll(req, res) {
|
|||
|
||||
res.json(response);
|
||||
});
|
||||
|
||||
plugins.recordPing(session(req), req.query, function(err) {
|
||||
if (err) console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
function trade(req, res) {
|
||||
|
|
@ -89,6 +93,7 @@ function trade(req, res) {
|
|||
|
||||
function stateChange(req, res) {
|
||||
plugins.stateChange(session(req), req.body, function(err) {
|
||||
if (err) console.error(err)
|
||||
res.json(200)
|
||||
})
|
||||
}
|
||||
|
|
@ -211,7 +216,11 @@ function init(localConfig) {
|
|||
}
|
||||
|
||||
function session(req) {
|
||||
return {fingerprint: getFingerprint(req), id: req.get('session-id')};
|
||||
return {
|
||||
fingerprint: getFingerprint(req),
|
||||
id: req.get('session-id'),
|
||||
deviceTime: Date.parse(req.get('date'))
|
||||
};
|
||||
}
|
||||
|
||||
function getFingerprint(req) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue