chore: make lint happy, add database dir

This commit is contained in:
CrescentLeaf
2025-06-15 22:40:03 +08:00
parent 1d8781e537
commit 9efd9ebd1d

View File

@@ -2,12 +2,13 @@ import io from './lib/io.js'
export default class Config {
static ensureAllDirsAreCreated() {
for (const key of Object.keys(Config.dirs)) {
for (const key of Object.keys(Config.dirs) as Array<keyof typeof Config.dirs>) {
io.mkdirs(Config.dirs[key])
}
}
static BASE_DIR = 'whitesilk_data'
static dirs : { [key: string]: string } = {
WEB_PAGE_DIR: this.BASE_DIR + '/_webpage'
static dirs = {
WEB_PAGE_DIR: this.BASE_DIR + '/_webpage',
DATABASES_DIR: this.BASE_DIR + '/databases',
}
}