diff --git a/src/typescript.tpl.php b/src/typescript.tpl.php index 3f70439..0ee148a 100644 --- a/src/typescript.tpl.php +++ b/src/typescript.tpl.php @@ -6,7 +6,7 @@ */ class apiName; ?> { - endpont = "endpoint; ?>"; + endpoint = endpoint, 0, 4) == 'http' ? '"%s"' : '%s', $this->endpoint); ?>; /* ---------------------------------------------------- * General API call @@ -29,7 +29,7 @@ class apiName; ?> { if (typeof val == 'object') val = JSON.stringify(val); form_data.append(key, val); }); - xhttp.open('POST', this.endpont + '?action=' + method); + xhttp.open('POST', this.endpoint + '?action=' + method); xhttp.send(form_data); }