Skip to content

Commit a4ec61b

Browse files
committed
fix: fix deepl
1 parent ab18b90 commit a4ec61b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/interfaces/deepl.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async function translate_by_key(text, from, to, setText, id, key) {
111111
if (from !== 'auto') {
112112
body['source_lang'] = supportLanguage[from];
113113
}
114-
const url = 'https://api-free.deepl.com/v2/translate'
114+
let url = 'https://api-free.deepl.com/v2/translate';
115115
if (!key.endsWith(':fx')) {
116116
url = 'https://api.deepl.com/v2/translate'
117117
}
@@ -120,6 +120,7 @@ async function translate_by_key(text, from, to, setText, id, key) {
120120
body: Body.json(body),
121121
headers: headers,
122122
});
123+
console.log(res);
123124
if (res.ok) {
124125
const result = res.data;
125126
if ((result.translations, result.translations[0])) {

0 commit comments

Comments
 (0)