// ---------------------------------------------------------------------------
function removeCacheDirectories () {
- const cacheDirectories = CACHE.DIRECTORIES
+ const cacheDirectories = Object.keys(CACHE)
+ .map(k => CACHE[k].DIRECTORY)
const tasks: Promise<any>[] = []
function createDirectoriesIfNotExist () {
const storage = CONFIG.STORAGE
- const cacheDirectories = CACHE.DIRECTORIES
+ const cacheDirectories = Object.keys(CACHE)
+ .map(k => CACHE[k].DIRECTORY)
- const tasks = []
+ const tasks: Promise<string>[] = []
for (const key of Object.keys(storage)) {
const dir = storage[key]
tasks.push(mkdirpPromise(dir))
email,
password,
role,
+ nsfwPolicy: CONFIG.INSTANCE.DEFAULT_NSFW_POLICY,
videoQuota: -1
}
const user = new UserModel(userData)