add check session api
This commit is contained in:
parent
3a08cbb1fb
commit
06f237314c
@ -4,7 +4,8 @@ const {
|
||||
chkObject,
|
||||
resObject,
|
||||
APIError,
|
||||
genError
|
||||
genError,
|
||||
checkSession
|
||||
} = require('@libs/route-utils')
|
||||
const DB = require('@libs/database')
|
||||
const r = new Router()
|
||||
@ -54,6 +55,10 @@ r.post('/login', koaBody(), async (c, n) => {
|
||||
c.obj = resObject('Success')
|
||||
})
|
||||
|
||||
r.get('/session', checkSession, async (c, n) => {
|
||||
c.obj = resObject('Success')
|
||||
})
|
||||
|
||||
r.use('/twitch', require('./twitch').routes())
|
||||
|
||||
module.exports = r
|
||||
|
Loading…
Reference in New Issue
Block a user