Skip to content

Commit 37c61d5

Browse files
committed
fix: remove glue code
1 parent 57423a5 commit 37c61d5

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/api.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,7 @@ export class Api {
2525
...requestObject.body,
2626
auth_key: this.token,
2727
}
28-
let url = `${this.baseUrl}${requestObject.url}`
29-
30-
if (this.provider !== 'deepl') {
31-
if (['GET', 'HEAD', 'DELETE'].includes(requestObject.method)) {
32-
body.token = body.auth_key
33-
} else {
34-
url = `${url}?token=${this.token}`
35-
}
36-
}
28+
const url = `${this.baseUrl}${requestObject.url}`
3729

3830
return await $http.request({
3931
...requestObject,

0 commit comments

Comments
 (0)