Servers fixes

This commit is contained in:
Prospector
2025-06-03 16:15:57 -07:00
parent 3f77ab19ed
commit 4e8ebb5e5c
8 changed files with 66 additions and 29 deletions

View File

@@ -2,6 +2,7 @@
import { $fetch, FetchError } from "ofetch";
import type { ServerNotice } from "@modrinth/utils";
import type { FilesystemOp, FSQueuedOp, WSBackupState, WSBackupTask } from "~/types/servers.ts";
import { usePyroFetch } from "~/composables/pyroFetch.ts";
interface PyroFetchOptions {
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
@@ -1224,6 +1225,13 @@ const modules: any = {
suspend: suspendServer,
getMotd,
setMotd,
endIntro: async () => {
await usePyroFetch(`servers/${internalServerReference.value.serverId}/flows/intro`, {
method: "DELETE",
version: 1,
});
await internalServerReference.value.refresh(["general"]);
},
},
content: {
get: async (serverId: string) => {
@@ -1454,6 +1462,8 @@ type GeneralFunctions = {
* @deprecated Use fs.downloadFile instead
*/
fetchConfigFile: (fileName: string) => Promise<any>;
endIntro: () => Promise<void>;
};
type ContentFunctions = {