mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Reading stat log exclude file
This commit is contained in:
parent
b5d5f20b79
commit
ca981b7a9f
2 changed files with 8 additions and 1 deletions
|
@ -41,6 +41,7 @@ import dbtools from './utils/dbtools'
|
|||
import reqlogger from './middlewares/reqlogger.middleware'
|
||||
import idStats from './utils/ids'
|
||||
const extraModulesFile = './src/extraModules.json'
|
||||
const statExcludeFile = './data/statExclude.json'
|
||||
const modulesFile = './src/modules.json'
|
||||
const usersDBPath = './data/dbs/users.db'
|
||||
idStats.Load()
|
||||
|
@ -151,6 +152,12 @@ app.use(
|
|||
|
||||
const cookieSecret = uuidv4()
|
||||
app.use(cookieParser(cookieSecret))
|
||||
|
||||
if (!utils.FileExists(statExcludeFile)) {
|
||||
utils.WriteFile('[]', statExcludeFile)
|
||||
}
|
||||
const excludeFromStats = utils.ReadJSON(statExcludeFile)
|
||||
|
||||
app.use(
|
||||
reqlogger({
|
||||
loggableKeywords: ['news.json'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue