Migrate from koa-route to koa-router

This commit is contained in:
Jonathan Cremin 2015-08-22 16:16:15 +01:00
parent 8474cca94c
commit a4bf3dd51d
17 changed files with 206 additions and 291 deletions

View file

@ -34,7 +34,7 @@ export class FileController {
$rootScope.pageTitle = ' - ' + file.name;
if (file.status === 'uploading') {
file.percent = 0;
var ws = new ReconnectingWebSocket('wss://' + window.location.hostname + window.settings.api + '/file/' + file.id);
var ws = new ReconnectingWebSocket(window.settings.apiURL.replace(/^http/, 'ws') + '/file/' + file.id);
ws.onmessage = function (msg) {
var evt = JSON.parse(msg.data);
$rootScope.$broadcast(evt.type, evt.data);