diff --git a/src/js/client.js b/src/js/client.js index dfbbda707..4a9fe703a 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -608,12 +608,12 @@ angular.module('Application').service('Client', ['$http', '$interval', 'md5', 'N }).error(defaultErrorHandler(callback)); }; - Client.prototype.getPlatformLogs = function (units, follow, lines, callback) { + Client.prototype.getPlatformLogs = function (unit, follow, lines, callback) { if (follow) { - var eventSource = new EventSource(client.apiOrigin + '/api/v1/cloudron/logstream?lines=' + lines + '&access_token=' + token + '&units=' + units); + var eventSource = new EventSource(client.apiOrigin + '/api/v1/cloudron/logstream/' + unit + '?lines=' + lines + '&access_token=' + token); callback(null, eventSource); } else { - get('/api/v1/cloudron/logs?lines=100&units=' + units).success(function (data, status) { + get('/api/v1/cloudron/logs/' + unit + '?lines=100').success(function (data, status) { if (status !== 200 || typeof data !== 'object') return callback(new ClientError(status, data)); callback(null, data); }).error(defaultErrorHandler(callback));