You've already forked AstralRinth
forked from didirus/AstralRinth
Servers hotfixes (#3793)
* servers: Fix installing modpacks from search * remove console.log * Fix subdomain setting
This commit is contained in:
@@ -520,7 +520,6 @@ async function serverInstall(project) {
|
|||||||
|
|
||||||
if (projectType.value.id === "modpack") {
|
if (projectType.value.id === "modpack") {
|
||||||
await server.value.general.reinstall(
|
await server.value.general.reinstall(
|
||||||
server.value.serverId,
|
|
||||||
false,
|
false,
|
||||||
project.project_id,
|
project.project_id,
|
||||||
version.id,
|
version.id,
|
||||||
|
|||||||
@@ -155,26 +155,18 @@ const saveGeneral = async () => {
|
|||||||
if (serverSubdomain.value !== data.value?.net?.domain) {
|
if (serverSubdomain.value !== data.value?.net?.domain) {
|
||||||
try {
|
try {
|
||||||
// type shit backend makes me do
|
// type shit backend makes me do
|
||||||
const response = await props.server.network?.checkSubdomainAvailability(
|
const available = await props.server.network?.checkSubdomainAvailability(
|
||||||
serverSubdomain.value,
|
serverSubdomain.value,
|
||||||
);
|
);
|
||||||
if (response === undefined) {
|
|
||||||
throw new Error("Failed to check subdomain availability");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof response === "object" && response !== null && "available" in response) {
|
if (!available) {
|
||||||
const typedResponse = response as { available: boolean };
|
addNotification({
|
||||||
if (!typedResponse.available) {
|
group: "serverOptions",
|
||||||
addNotification({
|
type: "error",
|
||||||
group: "serverOptions",
|
title: "Subdomain not available",
|
||||||
type: "error",
|
text: "The subdomain you entered is already in use.",
|
||||||
title: "Subdomain not available",
|
});
|
||||||
text: "The subdomain you entered is already in use.",
|
return;
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
throw new Error("Invalid response format from availability check");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await props.server.network?.changeSubdomain(serverSubdomain.value);
|
await props.server.network?.changeSubdomain(serverSubdomain.value);
|
||||||
|
|||||||
Reference in New Issue
Block a user