mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 01:49:10 +00:00
modernize dependencies
This commit is contained in:
parent
ea51d94c16
commit
5a1fc526db
22 changed files with 8578 additions and 22658 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue