refactor: rename fn name

This commit is contained in:
Gabe
2025-09-03 13:05:41 +08:00
parent 2b496bda31
commit 6dd6b73c2f
2 changed files with 4 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ import {
import { sha256 } from "../libs/utils"; import { sha256 } from "../libs/utils";
import { msAuth } from "../libs/auth"; import { msAuth } from "../libs/auth";
import { kissLog } from "../libs/log"; import { kissLog } from "../libs/log";
import { fetchTranslate } from "./trans"; import { handleTranslate } from "./trans";
import { getHttpCachePolyfill, putHttpCachePolyfill } from "../libs/cache"; import { getHttpCachePolyfill, putHttpCachePolyfill } from "../libs/cache";
import { getBatchQueue } from "../libs/batchQueue"; import { getBatchQueue } from "../libs/batchQueue";
@@ -254,7 +254,7 @@ export const apiTranslate = async ({
docInfo, docInfo,
apiSetting, apiSetting,
usePool, usePool,
taskFn: fetchTranslate, taskFn: handleTranslate,
}, },
apiSetting apiSetting
); );
@@ -263,7 +263,7 @@ export const apiTranslate = async ({
[trText, srLang = ""] = tranlation; [trText, srLang = ""] = tranlation;
} }
} else { } else {
const translations = await fetchTranslate({ const translations = await handleTranslate({
translator, translator,
texts: [text], texts: [text],
from, from,

View File

@@ -809,7 +809,7 @@ export const parseTransRes = (
* @param {*} param0 * @param {*} param0
* @returns * @returns
*/ */
export const fetchTranslate = async ({ export const handleTranslate = async ({
translator, translator,
texts, texts,
from, from,