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

View File

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