Merge branch 'master' into release
This commit is contained in:
commit
a43ede311e
@ -73,7 +73,8 @@ const parseCMD = async (text = '', source = {}) => {
|
|||||||
let txt = ''
|
let txt = ''
|
||||||
console.log('obj ::: ', obj)
|
console.log('obj ::: ', obj)
|
||||||
for (let i of obj) {
|
for (let i of obj) {
|
||||||
txt += (txt.length > 0 ? '|' : '') + i.key
|
let key = i.key.replace(/(\+|\[|\]|\*|\$|\^|\(|\))/g, '\\$1')
|
||||||
|
txt += (txt.length > 0 ? '|' : '') + key
|
||||||
}
|
}
|
||||||
regex = new RegExp(`^(${txt})$`)
|
regex = new RegExp(`^(${txt})$`)
|
||||||
console.log(regex)
|
console.log(regex)
|
||||||
|
@ -55,6 +55,11 @@ r.post('/login', koaBody(), async (c, n) => {
|
|||||||
c.obj = resObject('Success')
|
c.obj = resObject('Success')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
r.post('/logout', async (c, n) => {
|
||||||
|
c.session = null
|
||||||
|
c.obj = resObject('Success')
|
||||||
|
})
|
||||||
|
|
||||||
r.get('/session', checkSession, async (c, n) => {
|
r.get('/session', checkSession, async (c, n) => {
|
||||||
c.obj = resObject('Success', {
|
c.obj = resObject('Success', {
|
||||||
user: c.state.loginUser
|
user: c.state.loginUser
|
||||||
|
Loading…
Reference in New Issue
Block a user