modernize dependencies

This commit is contained in:
41666 2018-11-01 01:36:39 -05:00
parent ea51d94c16
commit 5a1fc526db
22 changed files with 8578 additions and 22658 deletions

View file

@ -6,7 +6,7 @@ class SessionsService extends Service {
this.Session = ctx.M.Session
}
async get (id) {
async get (id, {rolling}) {
const user = await this.Session.findOne({ where: { id } })
if (user === null) {
@ -16,12 +16,14 @@ class SessionsService extends Service {
return user.data
}
async set (id, data, maxAge) {
async set (id, data, {maxAge, rolling, changed}) {
let session = await this.Session.findOne({ where: { id } })
if (session === null) {
session = this.Session.build({ id })
}
console.log(maxAge)
session.data = data
session.maxAge = maxAge