add get session reponse data

This commit is contained in:
Jay
2018-08-19 20:28:52 +08:00
parent 1f326715fd
commit b2c45d19d8
2 changed files with 8 additions and 1 deletions
+3 -1
View File
@@ -56,7 +56,9 @@ r.post('/login', koaBody(), async (c, n) => {
})
r.get('/session', checkSession, async (c, n) => {
c.obj = resObject('Success')
c.obj = resObject('Success', {
user: c.state.loginUser
})
})
r.use('/twitch', require('./twitch').routes())