Skip to content

Commit

Permalink
Updated Total.js API endpoint.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Jun 22, 2023
1 parent 8e3bcb9 commit 280595f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
========================

- added `charset=utf-8` to the JSON content-type in the `REQUEST()` method
- added `default_tapi` config key
- updated Total.js API endpoint

========================
0.0.86
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,7 @@ function Framework() {
default_image_converter: 'gm', // command-line name
default_image_quality: 93,
default_image_consumption: 0, // disabled because e.g. GM v1.3.32 throws some error about the memory
default_tapi: 'eu',

allow_tms: false,
allow_totalapi: true,
Expand Down Expand Up @@ -11342,7 +11343,7 @@ global.TotalAPI = function(token, type, data, callback, filename) {

var opt = {};
opt.method = 'POST';
opt.url = 'https://api.totaljs.com/' + type + '/';
opt.url = 'https://' + CONF.default_tapi + '.api.totaljs.com/' + type + '/';
opt.body = JSON.stringify(data);
opt.type = 'json';
opt.keepalive = true;
Expand Down

0 comments on commit 280595f

Please sign in to comment.