diff options
author | Puyodead1 <puyodead@proton.me> | 2023-03-18 19:48:44 -0400 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-03-18 19:48:44 -0400 |
commit | 7116a9a1b0ee782d10330d5272ed340a36b5ddb6 (patch) | |
tree | 65497d7fefa3cf4610d2258414e5d749f696a4c5 /src | |
parent | Move redirect uri generation to getRedirectUri function of Connection class. (diff) | |
download | server-7116a9a1b0ee782d10330d5272ed340a36b5ddb6.tar.xz |
fix a few linting errors
Diffstat (limited to 'src')
-rw-r--r-- | src/util/connections/ConnectionConfig.ts | 2 | ||||
-rw-r--r-- | src/util/connections/ConnectionLoader.ts | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/util/connections/ConnectionConfig.ts b/src/util/connections/ConnectionConfig.ts index acbca026..4950ae90 100644 --- a/src/util/connections/ConnectionConfig.ts +++ b/src/util/connections/ConnectionConfig.ts @@ -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("_"); diff --git a/src/util/connections/ConnectionLoader.ts b/src/util/connections/ConnectionLoader.ts index 04d7752a..0ca5b9e7 100644 --- a/src/util/connections/ConnectionLoader.ts +++ b/src/util/connections/ConnectionLoader.ts @@ -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) || {}, + ), }); } } |