|
@@ -3,6 +3,7 @@
|
|
|
var app = new Vue({
|
|
|
el: '#vue-app',
|
|
|
data: {
|
|
|
+ api_host : "http://192.241.167.183",
|
|
|
newsletter: {
|
|
|
email : '',
|
|
|
alert_class : 'alert-secondary',
|
|
@@ -57,7 +58,7 @@
|
|
|
var payload = { email: this.newsletter.email }
|
|
|
console.log("Subscribing to newsletter", payload);
|
|
|
var req = new XMLHttpRequest();
|
|
|
- req.open('POST', "http://localhost:3101/register", true);
|
|
|
+ req.open('POST', `${this.api_host}/register`, true);
|
|
|
req.setRequestHeader('Content-Type', 'application/json');
|
|
|
var res = undefined;
|
|
|
req.onreadystatechange = function() {
|
|
@@ -130,7 +131,7 @@
|
|
|
this.contact.message.send_status = "sending";
|
|
|
var vm = this;
|
|
|
var req = new XMLHttpRequest();
|
|
|
- req.open('POST', "http://localhost:3102/receive", true);
|
|
|
+ req.open('POST', `${this.api_host}/receive`, true);
|
|
|
req.setRequestHeader('Content-Type', 'application/json');
|
|
|
req.onreadystatechange = function() {
|
|
|
if(req.status == 200) {
|
|
@@ -153,7 +154,7 @@
|
|
|
this.contact.feedback.send_status = "sending";
|
|
|
var vm = this;
|
|
|
var req = new XMLHttpRequest();
|
|
|
- req.open('POST', "http://localhost:3102/receive", true);
|
|
|
+ req.open('POST', `${this.api_host}/receive`, true);
|
|
|
req.setRequestHeader('Content-Type', 'application/json');
|
|
|
req.onreadystatechange = function() {
|
|
|
if(req.status == 200) {
|
|
@@ -176,7 +177,7 @@
|
|
|
this.contact.report.send_status = "sending";
|
|
|
var vm = this;
|
|
|
var req = new XMLHttpRequest();
|
|
|
- req.open('POST', "http://localhost:3102/receive", true);
|
|
|
+ req.open('POST', `${this.api_host}/receive`, true);
|
|
|
req.setRequestHeader('Content-Type', 'application/json');
|
|
|
req.onreadystatechange = function() {
|
|
|
if(req.status == 200) {
|