diff --git a/src/inc/routes/admin.mjs b/src/inc/routes/admin.mjs index 60ad38a..4924da9 100644 --- a/src/inc/routes/admin.mjs +++ b/src/inc/routes/admin.mjs @@ -31,11 +31,11 @@ export default (router, tpl) => { return res.reply({ body: "user doesn't exist or wrong password" }); const stamp = ~~(Date.now() / 1e3); - await db` + /*await db` delete from user_sessions - where last_action <= ${(Date.now() - 6048e5)} + where last_used <= ${(Date.now() - 6048e5)} and kmsi = 0 - `; + `;*/ const session = lib.md5(lib.createID()); const blah = { @@ -44,13 +44,12 @@ export default (router, tpl) => { browser: req.headers["user-agent"], created_at: stamp, last_used: stamp, - last_action: "/login", kmsi: typeof req.post.kmsi !== 'undefined' ? 1 : 0 }; await db` insert into "user_sessions" ${ - db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'last_action', 'kmsi') + db(blah, 'user_id', 'session', 'browser', 'created_at', 'last_used', 'kmsi') } `;