Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 38486d0

Browse files
committed
fix: DeepL API authorization
1 parent cbd555a commit 38486d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/common/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class Client {
3131
.post(
3232
'/v2/translate',
3333
qs.stringify({
34-
auth_key: this.apiToken,
3534
target_lang: targetLang,
3635
split_sentences: '1',
3736
preserve_formatting: '0',
3837
text: text,
3938
}),
4039
{
4140
headers: {
42-
'content-type': 'application/x-www-form-urlencoded;charset=utf-8',
41+
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
42+
Authorization: `DeepL-Auth-Key ${this.apiToken}`,
4343
},
4444
responseType: 'json',
4545
},

0 commit comments

Comments
 (0)