diff --git a/backend/routers/index.ts b/backend/routers/index.ts index eed8d13..bcf6581 100644 --- a/backend/routers/index.ts +++ b/backend/routers/index.ts @@ -30,7 +30,7 @@ bb.extend(router, { router.get('/', (req, res) => UserConfig.ready ? res.render('index', { version: App.pkgVersion }) : res.redirect('/setup')); // Upload flow -router.post('/', rateLimiterMiddleware("upload", UserConfig.config?.rateLimit?.upload), async (req, res) => { +router.post('/', rateLimiterMiddleware('upload', UserConfig.config?.rateLimit?.upload), async (req, res) => { // Check user config if (!UserConfig.ready) return res.status(500).type('text').send('Configuration missing!'); diff --git a/backend/sql/database.ts b/backend/sql/database.ts index 6624245..800bd53 100644 --- a/backend/sql/database.ts +++ b/backend/sql/database.ts @@ -1,4 +1,4 @@ -import { AssFile, AssUser, NID, UploadToken } from "ass"; +import { AssFile, AssUser, NID, UploadToken } from 'ass'; export type DatabaseValue = AssFile | AssUser | UploadToken; export type DatabaseTable = 'assfiles' | 'assusers' | 'asstokens'; @@ -73,7 +73,7 @@ export class DBManager { public static configure(): Promise { if (this._db && this._dbReady) { return this._db.configure(); - } else throw new Error("No database active"); + } else throw new Error('No database active'); } /** @@ -82,7 +82,7 @@ export class DBManager { public static put(table: DatabaseTable, key: NID, data: DatabaseValue): Promise { if (this._db && this._dbReady) { return this._db.put(table, key, data); - } else throw new Error("No database active"); + } else throw new Error('No database active'); } /** @@ -91,7 +91,7 @@ export class DBManager { public static get(table: DatabaseTable, key: NID): Promise { if (this._db && this._dbReady) { return this._db.get(table, key); - } else throw new Error("No database active"); + } else throw new Error('No database active'); } /** @@ -100,6 +100,6 @@ export class DBManager { public static getAll(table: DatabaseTable): Promise<{ [index: string]: DatabaseValue }> { if (this._db && this._dbReady) { return this._db.getAll(table); - } else throw new Error("No database active"); + } else throw new Error('No database active'); } } \ No newline at end of file diff --git a/backend/sql/mysql.ts b/backend/sql/mysql.ts index 3e90b47..32b9abd 100644 --- a/backend/sql/mysql.ts +++ b/backend/sql/mysql.ts @@ -32,7 +32,7 @@ export class MySQLDatabase implements Database { // make sure the configuration exists if (!UserConfig.ready) return 'User configuration not ready'; if (typeof UserConfig.config.database != 'object') return 'MySQL configuration missing'; - if (UserConfig.config.database.kind != "mysql") return 'Database not set to MySQL, but MySQL is in use, something has gone terribly wrong'; + if (UserConfig.config.database.kind != 'mysql') return 'Database not set to MySQL, but MySQL is in use, something has gone terribly wrong'; if (typeof UserConfig.config.database.options != 'object') return 'MySQL configuration missing'; let mySqlConf = UserConfig.config.database.options;