From 3563d0568580150ad65e19de0ccd31d23398dd67 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 05:35:46 +0000 Subject: [PATCH 1/2] Lint Code [skip actions] --- src/handbook/src/backend/server.ts | 3 +-- src/handbook/src/utils.ts | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/handbook/src/backend/server.ts b/src/handbook/src/backend/server.ts index 72ac47d19..309ceac97 100644 --- a/src/handbook/src/backend/server.ts +++ b/src/handbook/src/backend/server.ts @@ -66,8 +66,7 @@ export function setTargetPlayer(player: number, token: string | null = null): vo */ export async function setServerDetails(newAddress: string | null, newPort: string | number | null): Promise { if (!getWindowDetails().disable) { - if (typeof newPort == "number") - newPort = newPort.toString(); + if (typeof newPort == "number") newPort = newPort.toString(); // Apply the new details. if (newAddress != null) { diff --git a/src/handbook/src/utils.ts b/src/handbook/src/utils.ts index 26a570497..286c657ea 100644 --- a/src/handbook/src/utils.ts +++ b/src/handbook/src/utils.ts @@ -174,11 +174,8 @@ export function getWindowDetails(): WindowDetails { const { address, port, disable } = details; return { - address: (address as string).includes("DETAILS_ADDRESS") - ? "127.0.0.1" : address, - port: (port as string).includes("DETAILS_PORT") - ? 443 : parseInt(port), - disable: (disable as string).includes("DETAILS_DISABLE") - ? false : disable == "true" + address: (address as string).includes("DETAILS_ADDRESS") ? "127.0.0.1" : address, + port: (port as string).includes("DETAILS_PORT") ? 443 : parseInt(port), + disable: (disable as string).includes("DETAILS_DISABLE") ? false : disable == "true" }; } From c719076f87eacdbce418bc5e49dcf66b3e56b21c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 05:36:13 +0000 Subject: [PATCH 2/2] Format code [skip actions] --- .../server/http/documentation/HandbookHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java b/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java index 07bfa709f..6ca6e8c24 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java @@ -1,5 +1,7 @@ package emu.grasscutter.server.http.documentation; +import static emu.grasscutter.config.Configuration.HANDBOOK; + import emu.grasscutter.Grasscutter; import emu.grasscutter.auth.AuthenticationSystem.AuthenticationRequest; import emu.grasscutter.server.http.Router; @@ -11,8 +13,6 @@ import io.javalin.Javalin; import io.javalin.http.ContentType; import io.javalin.http.Context; -import static emu.grasscutter.config.Configuration.HANDBOOK; - /** Handles requests for the new GM Handbook. */ public final class HandbookHandler implements Router { private String handbook;