From 0d18d598fb9f8946032ee58ee0322d1e1d3875b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=84=86=E8=96=AF=E9=A5=BC?= Date: Mon, 2 Dec 2024 14:36:04 +0800 Subject: [PATCH] fix: const --- src/Composite.Subtitles.response.dev.js | 7 ++----- src/Composite.Subtitles.response.js | 7 ++----- src/External.Subtitles.response.dev.js | 7 ++----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/Composite.Subtitles.response.dev.js b/src/Composite.Subtitles.response.dev.js index 0dd75b62..72fb99f8 100644 --- a/src/Composite.Subtitles.response.dev.js +++ b/src/Composite.Subtitles.response.dev.js @@ -14,11 +14,8 @@ import Composite from "./class/Composite.mjs"; const url = new URL($request.url); Console.info(`url: ${url.toJSON()}`); // 获取连接参数 -const METHOD = $request.method, - HOST = url.hostname, - PATH = url.pathname, - PATHs = url.pathname.split("/").filter(Boolean); -Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`); +const PATHs = url.pathname.split("/").filter(Boolean); +Console.info(`PATHs: ${PATHs}`); // 解析格式 let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(url, $response?.body, FORMAT); diff --git a/src/Composite.Subtitles.response.js b/src/Composite.Subtitles.response.js index 962b150d..7900ebdf 100644 --- a/src/Composite.Subtitles.response.js +++ b/src/Composite.Subtitles.response.js @@ -15,11 +15,8 @@ Console.debug = () => {}; const url = new URL($request.url); Console.info(`url: ${url.toJSON()}`); // 获取连接参数 -const METHOD = $request.method, - HOST = url.hostname, - PATH = url.pathname, - PATHs = url.pathname.split("/").filter(Boolean); -Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`); +const PATHs = url.pathname.split("/").filter(Boolean); +Console.info(`PATHs: ${PATHs}`); // 解析格式 let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(url, $response?.body, FORMAT); diff --git a/src/External.Subtitles.response.dev.js b/src/External.Subtitles.response.dev.js index 7bbc7ce5..6ca5ea96 100644 --- a/src/External.Subtitles.response.dev.js +++ b/src/External.Subtitles.response.dev.js @@ -12,11 +12,8 @@ import Composite from "./function/Composite.mjs"; const url = new URL($request.url); Console.info(`url: ${url.toJSON()}`); // 获取连接参数 -const METHOD = $request.method, - HOST = url.hostname, - PATH = url.pathname, - PATHs = url.pathname.split("/").filter(Boolean); -Console.info(`METHOD: ${METHOD}, HOST: ${HOST}, PATH: ${PATH}`); +const PATHs = url.pathname.split("/").filter(Boolean); +Console.info(`PATHs: ${PATHs}`); // 解析格式 let FORMAT = ($response.headers?.["Content-Type"] ?? $response.headers?.["content-type"])?.split(";")?.[0]; if (FORMAT === "application/octet-stream" || FORMAT === "text/plain") FORMAT = detectFormat(URL, $response?.body, FORMAT);