Adjust session expiration
This commit is contained in:
parent
99bec8f739
commit
0a4dda4d73
1 changed files with 1 additions and 1 deletions
|
@ -180,7 +180,7 @@ app.get('/api/users', (req, res, next) => {
|
||||||
app.get('/api/getuser', (req, res, next) => {
|
app.get('/api/getuser', (req, res, next) => {
|
||||||
console.log('Get: /api/getuser/', req.query.session);
|
console.log('Get: /api/getuser/', req.query.session);
|
||||||
var today = new Date().getTime() / 1000;
|
var today = new Date().getTime() / 1000;
|
||||||
var expiration = today - (7*24*3600);
|
var expiration = today - (24*3600);
|
||||||
usermodel.find({'session': req.query.session, 'blocktime': { $gt: expiration }}).
|
usermodel.find({'session': req.query.session, 'blocktime': { $gt: expiration }}).
|
||||||
then((documents) => {
|
then((documents) => {
|
||||||
if(documents.length > 0){
|
if(documents.length > 0){
|
||||||
|
|
Loading…
Reference in a new issue