File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
} from '../types/global'
6
6
7
7
export class Api {
8
- constructor ( private provider : validProvider | null , private token : string ) { }
8
+ constructor ( private provider : validProvider | null , private token : string ) { }
9
9
10
10
private get baseUrl ( ) : string {
11
11
switch ( this . provider ) {
@@ -23,7 +23,6 @@ export class Api {
23
23
try {
24
24
const body : Record < string , any > = {
25
25
...requestObject . body ,
26
- auth_key : this . token ,
27
26
}
28
27
const url = `${ this . baseUrl } ${ requestObject . url } `
29
28
@@ -32,7 +31,7 @@ export class Api {
32
31
url,
33
32
header : {
34
33
'Content-Type' : 'application/x-www-form-urlencoded' ,
35
- 'User-Agent' : 'a-translator-bob/' + process . env . __VERSION__ ,
34
+ Authorization : `DeepL-Auth-Key ${ this . token } ` ,
36
35
} ,
37
36
body,
38
37
} )
You can’t perform that action at this time.
0 commit comments