refactor: rename fn name
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user