remove trailing slash from API endpoint, appendum to 8da9d0b
This commit is contained in:
parent
375b32a151
commit
7e73986667
@ -55,15 +55,16 @@ define(["q"], function(Q) {
|
|||||||
|
|
||||||
if (script.dataset.prefix) {
|
if (script.dataset.prefix) {
|
||||||
endpoint = script.dataset.prefix;
|
endpoint = script.dataset.prefix;
|
||||||
if (endpoint[endpoint.length - 1] === "/") {
|
|
||||||
endpoint = endpoint.substring(0, endpoint.length - 1);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
uri = script.src.substring(host.length);
|
uri = script.src.substring(host.length);
|
||||||
endpoint = uri.substring(0, uri.length - "/js/embed.min.js".length);
|
endpoint = uri.substring(0, uri.length - "/js/embed.min.js".length);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (endpoint[endpoint.length - 1] === "/") {
|
||||||
|
endpoint = endpoint.substring(0, endpoint.length - 1);
|
||||||
|
}
|
||||||
|
|
||||||
var curl = function(method, url, data) {
|
var curl = function(method, url, data) {
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
|
Loading…
Reference in New Issue
Block a user