From 2b4319ea55830da0610e7ea70c914a15dd311960 Mon Sep 17 00:00:00 2001 From: Prospector <6166773+Prospector@users.noreply.github.com> Date: Sun, 15 Jun 2025 16:17:38 -0700 Subject: [PATCH] Servers hotfixes (#3793) * servers: Fix installing modpacks from search * remove console.log * Fix subdomain setting --- .../src/pages/search/[searchProjectType].vue | 1 - .../servers/manage/[id]/options/index.vue | 26 +++++++------------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/apps/frontend/src/pages/search/[searchProjectType].vue b/apps/frontend/src/pages/search/[searchProjectType].vue index 42f01ad67..c12b92fad 100644 --- a/apps/frontend/src/pages/search/[searchProjectType].vue +++ b/apps/frontend/src/pages/search/[searchProjectType].vue @@ -520,7 +520,6 @@ async function serverInstall(project) { if (projectType.value.id === "modpack") { await server.value.general.reinstall( - server.value.serverId, false, project.project_id, version.id, diff --git a/apps/frontend/src/pages/servers/manage/[id]/options/index.vue b/apps/frontend/src/pages/servers/manage/[id]/options/index.vue index 7ff812b7b..c1c1911c4 100644 --- a/apps/frontend/src/pages/servers/manage/[id]/options/index.vue +++ b/apps/frontend/src/pages/servers/manage/[id]/options/index.vue @@ -155,26 +155,18 @@ const saveGeneral = async () => { if (serverSubdomain.value !== data.value?.net?.domain) { try { // type shit backend makes me do - const response = await props.server.network?.checkSubdomainAvailability( + const available = await props.server.network?.checkSubdomainAvailability( serverSubdomain.value, ); - if (response === undefined) { - throw new Error("Failed to check subdomain availability"); - } - if (typeof response === "object" && response !== null && "available" in response) { - const typedResponse = response as { available: boolean }; - if (!typedResponse.available) { - addNotification({ - group: "serverOptions", - type: "error", - title: "Subdomain not available", - text: "The subdomain you entered is already in use.", - }); - return; - } - } else { - throw new Error("Invalid response format from availability check"); + if (!available) { + addNotification({ + group: "serverOptions", + type: "error", + title: "Subdomain not available", + text: "The subdomain you entered is already in use.", + }); + return; } await props.server.network?.changeSubdomain(serverSubdomain.value);