mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-04 12:42:32 +00:00
Enable eslint rule @stylistic/ts/indent (#1779)
## Description: Enable eslint rule `@stylistic/ts/indent`. Fixes #1778 ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -63,14 +63,14 @@ async function handleJoinMessage(
|
||||
): Promise<
|
||||
| undefined
|
||||
| {
|
||||
success: true;
|
||||
}
|
||||
success: true;
|
||||
}
|
||||
| {
|
||||
success: false;
|
||||
code: 1002;
|
||||
description: string;
|
||||
error?: string;
|
||||
reason:
|
||||
success: false;
|
||||
code: 1002;
|
||||
description: string;
|
||||
error?: string;
|
||||
reason:
|
||||
| "ClientJoinMessageSchema"
|
||||
| "Flag invalid"
|
||||
| "Flag restricted"
|
||||
@@ -80,20 +80,20 @@ async function handleJoinMessage(
|
||||
| "Pattern restricted"
|
||||
| "Pattern unlisted"
|
||||
| "Unauthorized";
|
||||
}
|
||||
}
|
||||
| {
|
||||
success: false;
|
||||
code: 1011;
|
||||
reason: "Internal server error";
|
||||
error: string;
|
||||
description: string;
|
||||
}
|
||||
success: false;
|
||||
code: 1011;
|
||||
reason: "Internal server error";
|
||||
error: string;
|
||||
description: string;
|
||||
}
|
||||
> {
|
||||
const forwarded = req.headers["x-forwarded-for"];
|
||||
const ip = Array.isArray(forwarded)
|
||||
? forwarded[0]
|
||||
: // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
||||
forwarded || req.socket.remoteAddress || "unknown";
|
||||
forwarded || req.socket.remoteAddress || "unknown";
|
||||
|
||||
try {
|
||||
// Parse and handle client messages
|
||||
|
||||
Reference in New Issue
Block a user