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

@@ -354,9 +354,9 @@ Output: {"translations":[{"id":1,"text":"一个<b>React</b>组件","sourceLangua
Fail-safe: On any error, return {"translations":[]}.`;
const defaultRequestHook = `async (args, { url, data, headers, userMsg, method } = {}) => {
const defaultRequestHook = `async (args, { url, body, headers, userMsg, method } = {}) => {
console.log("request hook args:", args);
// return { url, data, headers, userMsg, method };
// return { url, body, headers, userMsg, method };
}`;
const defaultResponseHook = `async ({ res, ...args }) => {