Skip to content

Commit f721f01

Browse files
committed
feat: change api endpoint
1 parent f8caa47 commit f721f01

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

rollup.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export default {
3333
'process.env.NODE_ENV': JSON.stringify(
3434
process.env.NODE_ENV || 'development',
3535
),
36+
'process.env.__VERSION__': JSON.stringify(
37+
require('./package.json').version,
38+
),
3639
}),
3740
nodePolyfills(),
3841
typescript({}),

src/api.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class Api {
1111
case 'deepl':
1212
return 'https://api.deepl.com'
1313
case 'sub-deepl':
14-
return 'https://sub-deepl.nerdynerd.org'
14+
return 'https://sub-deepl-api.nerdynerd.org'
1515
case 'local':
1616
return 'http://localhost:1337'
1717
}
@@ -40,6 +40,7 @@ export class Api {
4040
url,
4141
header: {
4242
'Content-Type': 'application/x-www-form-urlencoded',
43+
'User-Agent': 'sub-deepl-bob/' + process.env.__VERSION__,
4344
},
4445
body,
4546
})

0 commit comments

Comments
 (0)