[TS] Initial Typescript fix

This commit is contained in:
Dunemask 2024-04-06 20:38:10 -06:00
parent 8c15dd6752
commit 813295c857
36 changed files with 4285 additions and 1951 deletions

View file

@ -21,10 +21,10 @@ import {
getServerItem,
moveServerItems,
previewServerItem,
} from "@mcl/queries";
import { cairoAuthHeader } from "@mcl/util/auth.js";
uploadServerItem,
} from "@mcl/api/clients/files";
import { supportedFileTypes } from "./FilePreview.jsx";
import { supportedFileTypes } from "./FilePreview.tsx";
export default function MineclusterFiles(props) {
// Chonky configuration
@ -118,11 +118,7 @@ export default function MineclusterFiles(props) {
formData.append("id", serverId);
const path = `${[...dirStack].join("/")}${filePath}`;
formData.append("path", path);
await fetch("/api/files/upload", {
method: "POST",
body: formData,
headers: cairoAuthHeader(),
});
await uploadServerItem(formData);
}
async function downloadFiles(files) {