From e3a0067426b0c9dae443c579f7baaef0ef3bdd96 Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@helsinki.at>
Date: Fri, 17 Feb 2017 03:22:30 +0100
Subject: remove hardcoded url


diff --git a/www/js/importer.js b/www/js/importer.js
index 5d047ef..0753b5d 100644
--- a/www/js/importer.js
+++ b/www/js/importer.js
@@ -453,7 +453,7 @@ Rdxport.Upload.prototype.onmessage = function(event) {
           error: function(req, status, err) { console.log({StatusText: status, ErrorString: err}); },
           success: function(data, status, req) { console.log(data); }
         };
-        $.ajax('https://import.helsinki.at/upload/' + importer.username + '/' + data.ID, command);
+        $.ajax('https://' + window.location.host + '/upload/' + importer.username + '/' + data.ID, command);
       }
       this.isNew = true;
       this.group.fetchCarts();
diff --git a/www/js/router.js b/www/js/router.js
index cbd453c..8c68685 100644
--- a/www/js/router.js
+++ b/www/js/router.js
@@ -55,7 +55,7 @@ Rdxport.Router.prototype.route = function(page, subpage) {
   }
 
   if (!importer) {
-    importer = new Rdxport.Importer(this.auth.username, this.auth.token, 'wss://import.helsinki.at/rhimportd');
+    importer = new Rdxport.Importer(this.auth.username, this.auth.token, 'wss://' + window.location.host + '/rhimportd');
     window.onbeforeunload = function(event) {
       if (importer.isUploading()) {
         return 'Achtung: Es laufen noch imports.';
-- 
cgit v0.10.2