Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/ass/commit/3cfef2ba4c4ddc92d48a05fb07a2dacb6a2ad406 You should set ROOT_URL correctly, otherwise the web may not work correctly.

fix style stuff

x-dev-15
xwashere 1 year ago
parent a8f1d55078
commit 3cfef2ba4c
No known key found for this signature in database
GPG Key ID: 042F8BFA1B0EF93B

@ -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!');

@ -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<void> {
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<void> {
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<DatabaseValue | undefined> {
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');
}
}

@ -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;

Loading…
Cancel
Save