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 55} from '../types/global'
66
77export class Api {
8- constructor ( private provider : validProvider | null , private token : string ) { }
8+ constructor ( private provider : validProvider | null , private token : string ) { }
99
1010 private get baseUrl ( ) : string {
1111 switch ( this . provider ) {
@@ -23,7 +23,6 @@ export class Api {
2323 try {
2424 const body : Record < string , any > = {
2525 ...requestObject . body ,
26- auth_key : this . token ,
2726 }
2827 const url = `${ this . baseUrl } ${ requestObject . url } `
2928
@@ -32,7 +31,7 @@ export class Api {
3231 url,
3332 header : {
3433 'Content-Type' : 'application/x-www-form-urlencoded' ,
35- 'User-Agent' : 'a-translator-bob/' + process . env . __VERSION__ ,
34+ Authorization : `DeepL-Auth-Key ${ this . token } ` ,
3635 } ,
3736 body,
3837 } )
You can’t perform that action at this time.
0 commit comments