mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
More Hot-Reload related changes
* Config.get(): Returns the latest config * Update code all over the place to use Config.get() vs Config.conf (which will be deprecated)
This commit is contained in:
parent
ca0149eaf0
commit
1fe46894d3
42 changed files with 320 additions and 273 deletions
|
@ -7,7 +7,7 @@ const {
|
|||
getISOTimestampString,
|
||||
sanatizeString
|
||||
} = require('./database.js');
|
||||
const Config = require('./config.js').config;
|
||||
const Config = require('./config.js').get;
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -202,7 +202,8 @@ module.exports = class FileEntry {
|
|||
}
|
||||
|
||||
static getAreaStorageDirectoryByTag(storageTag) {
|
||||
const storageLocation = (storageTag && Config.fileBase.storageTags[storageTag]);
|
||||
const config = Config();
|
||||
const storageLocation = (storageTag && config.fileBase.storageTags[storageTag]);
|
||||
|
||||
// absolute paths as-is
|
||||
if(storageLocation && '/' === storageLocation.charAt(0)) {
|
||||
|
@ -210,7 +211,7 @@ module.exports = class FileEntry {
|
|||
}
|
||||
|
||||
// relative to |areaStoragePrefix|
|
||||
return paths.join(Config.fileBase.areaStoragePrefix, storageLocation || '');
|
||||
return paths.join(config.fileBase.areaStoragePrefix, storageLocation || '');
|
||||
}
|
||||
|
||||
get filePath() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue