fix: rename data to body

This commit is contained in:
Gabe
2025-10-05 17:47:29 +08:00
parent e562f0b851
commit df8c96569a
5 changed files with 52 additions and 52 deletions

View File

@@ -1,7 +1,7 @@
import { DEFAULT_USER_AGENT } from "../config";
export const genBaidu = ({ texts, from, to }) => {
const data = {
const body = {
from,
to,
query: texts.join(" "),
@@ -15,5 +15,5 @@ export const genBaidu = ({ texts, from, to }) => {
"User-Agent": DEFAULT_USER_AGENT,
};
return { url, data, headers };
return { url, body, headers };
};