服务启动刷新游客cookie

This commit is contained in:
binaryify
2022-05-29 21:45:48 +08:00
parent 9e5c9372fe
commit b3ca43267a
8 changed files with 47 additions and 9 deletions

View File

@ -11,7 +11,7 @@ fs.readdirSync(path.join(__dirname, 'module'))
if (!file.endsWith('.js')) return
let fileModule = require(path.join(__dirname, 'module', file))
let fn = file.split('.').shift() || ''
obj[fn] = function (data) {
obj[fn] = function (data = {}) {
if (typeof data.cookie === 'string') {
data.cookie = cookieToJson(data.cookie)
}