Skip to content

Commit

Permalink
feat: change api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Nov 21, 2020
1 parent f8caa47 commit f721f01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default {
'process.env.NODE_ENV': JSON.stringify(
process.env.NODE_ENV || 'development',
),
'process.env.__VERSION__': JSON.stringify(
require('./package.json').version,
),
}),
nodePolyfills(),
typescript({}),
Expand Down
3 changes: 2 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export class Api {
case 'deepl':
return 'https://api.deepl.com'
case 'sub-deepl':
return 'https://sub-deepl.nerdynerd.org'
return 'https://sub-deepl-api.nerdynerd.org'
case 'local':
return 'http://localhost:1337'
}
Expand Down Expand Up @@ -40,6 +40,7 @@ export class Api {
url,
header: {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'sub-deepl-bob/' + process.env.__VERSION__,
},
body,
})
Expand Down

0 comments on commit f721f01

Please sign in to comment.