Add Download Task

This commit is contained in:
2023-06-27 19:19:17 +08:00
parent 086441e3b7
commit f58ad21a5c
12 changed files with 427 additions and 21 deletions

View File

@@ -51,7 +51,7 @@ export const handler: Handlers = {
return return_error(400, "token is needed.");
},
async PUT(req, _ctx) {
const ct = req.headers.get("Content-Type").split(";")[0].trim() || "";
const ct = req.headers.get("Content-Type")?.split(";")[0].trim() || "";
if (ct === "application/json") {
if (!req.body) return_error(1, "Body not found.");
let b = null;