mirror of
https://github.com/chaos-zhu/easynode.git
synced 2026-10-07 13:38:14 +08:00
fix: 修复ipWhiteList脏数据问题
This commit is contained in:
@@ -4,8 +4,8 @@ const sessionDB = new SessionDB().getInstance()
|
||||
|
||||
async function getLog({ res }) {
|
||||
let sessionList = await sessionDB.findAsync({})
|
||||
let { ipWhiteList } = await keyDB.findOneAsync({})
|
||||
ipWhiteList = ipWhiteList.filter(ip => Boolean(ip))
|
||||
let { ipWhiteList = [] } = await keyDB.findOneAsync({}) || {}
|
||||
ipWhiteList = ipWhiteList.filter(ip => typeof ip === 'string' && ip.trim() !== '')
|
||||
sessionList = sessionList.map(item => {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { session, ...otherInfo } = item
|
||||
|
||||
Reference in New Issue
Block a user