mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-15 01:49:10 +00:00
server: fix sessions store not being in koa-session middleware
This commit is contained in:
parent
6ec6123fa9
commit
e36be9e381
3 changed files with 14 additions and 15 deletions
|
@ -29,9 +29,12 @@ class SessionsService extends Service {
|
|||
}
|
||||
|
||||
async destroy (id) {
|
||||
return (await this.Session.findOne({ where: { id } })).destroy()
|
||||
}
|
||||
const sess = await this.Session.findOne({ where: { id } })
|
||||
|
||||
if (sess != null) {
|
||||
return sess.destroy()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SessionsService
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue