summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 07:44:04 +0100
committerRory& <root@rory.gay>2025-12-17 07:44:04 +0100
commit9963ea452769f43fb9fe3f3edd23a8b45f49369d (patch)
treeab749873ab24cec89316ba0d74c0712631316f1b
parentPrettier 2 (diff)
downloadserver-ts-9963ea452769f43fb9fe3f3edd23a8b45f49369d.tar.xz
Prettier 3
-rw-r--r--src/api/routes/guilds/#guild_id/delete.ts3
-rw-r--r--src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts3
-rw-r--r--src/api/util/utility/Base64.ts3
-rw-r--r--src/util/connections/ConnectionStore.ts3
-rw-r--r--src/util/util/Database.ts3
-rw-r--r--src/util/util/Gifs.ts3
-rw-r--r--src/webrtc/util/Send.ts3
7 files changed, 7 insertions, 14 deletions
diff --git a/src/api/routes/guilds/#guild_id/delete.ts b/src/api/routes/guilds/#guild_id/delete.ts

index 195190f7..509445c4 100644 --- a/src/api/routes/guilds/#guild_id/delete.ts +++ b/src/api/routes/guilds/#guild_id/delete.ts
@@ -45,8 +45,7 @@ router.post( where: { id: guild_id }, select: ["owner_id"], }); - if (guild.owner_id !== req.user_id) - throw new HTTPError("You are not the owner of this guild", 401); + if (guild.owner_id !== req.user_id) throw new HTTPError("You are not the owner of this guild", 401); await Promise.all([ Guild.delete({ id: guild_id }), // this will also delete all guild related data diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts
index a0f42daa..6dc06563 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts
@@ -41,8 +41,7 @@ router.delete( }); // disable webauthn if there are no keys left - if (keys === 0) - await User.update({ id: req.user_id }, { webauthn_enabled: false }); + if (keys === 0) await User.update({ id: req.user_id }, { webauthn_enabled: false }); res.sendStatus(204); }, diff --git a/src/api/util/utility/Base64.ts b/src/api/util/utility/Base64.ts
index c6d1257c..7426d22b 100644 --- a/src/api/util/utility/Base64.ts +++ b/src/api/util/utility/Base64.ts
@@ -16,8 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -const alphabet = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; +const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; // binary to string lookup table const b2s = alphabet.split(""); diff --git a/src/util/connections/ConnectionStore.ts b/src/util/connections/ConnectionStore.ts
index 95e54fd9..0cc4dc31 100644 --- a/src/util/connections/ConnectionStore.ts +++ b/src/util/connections/ConnectionStore.ts
@@ -20,6 +20,5 @@ import { Connection } from "./Connection"; import { RefreshableConnection } from "./RefreshableConnection"; export class ConnectionStore { - public static connections: Map<string, Connection | RefreshableConnection> = - new Map(); + public static connections: Map<string, Connection | RefreshableConnection> = new Map(); } diff --git a/src/util/util/Database.ts b/src/util/util/Database.ts
index 78712b9e..69c83f63 100644 --- a/src/util/util/Database.ts +++ b/src/util/util/Database.ts
@@ -108,8 +108,7 @@ export async function initDatabase(): Promise<DataSource> { if (!(await dbExists())) { console.log("[Database] This appears to be a fresh database. Running initial DDL."); const qr = dbConnection.createQueryRunner(); - if (fs.existsSync(path.join(__dirname, "..", "migration", DatabaseType, "initial0.js"))) - await new (require(`../migration/${DatabaseType}-initial`).initial0)().up(qr); + if (fs.existsSync(path.join(__dirname, "..", "migration", DatabaseType, "initial0.js"))) await new (require(`../migration/${DatabaseType}-initial`).initial0)().up(qr); } console.log("[Database] Applying missing migrations, if any."); diff --git a/src/util/util/Gifs.ts b/src/util/util/Gifs.ts
index 23152e81..9651e234 100644 --- a/src/util/util/Gifs.ts +++ b/src/util/util/Gifs.ts
@@ -18,8 +18,7 @@ export function parseGifResult(result: TenorGif) { export function getGifApiKey() { const { enabled, provider, apiKey } = Config.get().gif; if (!enabled) throw new HTTPError(`Gifs are disabled`); - if (provider !== "tenor" || !apiKey) - throw new HTTPError(`${provider} gif provider not supported`); + if (provider !== "tenor" || !apiKey) throw new HTTPError(`${provider} gif provider not supported`); return apiKey; } diff --git a/src/webrtc/util/Send.ts b/src/webrtc/util/Send.ts
index 7f8ab4dd..cfd0b63a 100644 --- a/src/webrtc/util/Send.ts +++ b/src/webrtc/util/Send.ts
@@ -3,8 +3,7 @@ import { VoicePayload } from "./Constants"; import { WebRtcWebSocket } from "./WebRtcWebSocket"; export function Send(socket: WebRtcWebSocket, data: VoicePayload) { - if (process.env.WRTC_WS_VERBOSE) - console.log(`[WebRTC] Outgoing message: ${JSON.stringify(data)}`); + if (process.env.WRTC_WS_VERBOSE) console.log(`[WebRTC] Outgoing message: ${JSON.stringify(data)}`); let buffer: Buffer | string;