This commit is contained in:
Rizky
2024-06-21 18:02:27 +07:00
parent 15c0ef6977
commit 2d6d3fd7a9
3 changed files with 24 additions and 5 deletions
-1
View File
@@ -1,5 +1,4 @@
import brotliPromise from "brotli-wasm"; // Import the default export
import { gzipSync } from "bun";
import { simpleHash } from "utils/cache";
import { g } from "utils/global";
const brotli = await brotliPromise;
+3 -4
View File
@@ -24,8 +24,6 @@ export const serveAPI = async (url: URL, req: Request) => {
if (!req.headers.get("content-type")?.startsWith("multipart/form-data")) {
try {
const json = await req.json();
if (typeof json === "object") {
if (Array.isArray(json)) {
args = json;
@@ -47,8 +45,9 @@ export const serveAPI = async (url: URL, req: Request) => {
}
}
}
} catch (e) { }
} catch (e) {
console.log(e);
}
}
}