mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 19:52:36 +01:00
fix a few linting errors
This commit is contained in:
parent
c7277efbad
commit
7116a9a1b0
@ -54,7 +54,7 @@ function applyConfig(val: any) {
|
||||
}
|
||||
|
||||
function pairsToConfig(pairs: ConnectionConfigEntity[]) {
|
||||
let value: any = {};
|
||||
const value: any = {};
|
||||
|
||||
pairs.forEach((p) => {
|
||||
const keys = p.key.split("_");
|
||||
|
@ -6,7 +6,7 @@ import { ConnectionConfig } from "./ConnectionConfig";
|
||||
import { ConnectionStore } from "./ConnectionStore";
|
||||
|
||||
const root = "dist/connections";
|
||||
let connectionsLoaded = false;
|
||||
const connectionsLoaded = false;
|
||||
|
||||
export class ConnectionLoader {
|
||||
public static async loadConnections() {
|
||||
@ -22,7 +22,7 @@ export class ConnectionLoader {
|
||||
});
|
||||
|
||||
dirs.forEach(async (x) => {
|
||||
let modPath = path.resolve(path.join(root, x));
|
||||
const modPath = path.resolve(path.join(root, x));
|
||||
const mod = new (require(modPath).default)() as Connection;
|
||||
ConnectionStore.connections.set(mod.id, mod);
|
||||
|
||||
@ -58,7 +58,10 @@ export class ConnectionLoader {
|
||||
);
|
||||
|
||||
await ConnectionConfig.set({
|
||||
[id]: Object.assign(config, (ConnectionLoader.getConnectionConfig(id) || {}))
|
||||
[id]: Object.assign(
|
||||
config,
|
||||
ConnectionLoader.getConnectionConfig(id) || {},
|
||||
),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user