Fixed: Downloading log file asking for password when authentication is disabled

pull/3113/head
Mark McDowall 11 years ago
parent c6e492af4e
commit 4752ba3341

@ -26,7 +26,7 @@ namespace NzbDrone.Api.Frontend.Mappers
public override bool CanHandle(string resourceUrl) public override bool CanHandle(string resourceUrl)
{ {
return resourceUrl.StartsWith("/log/") && resourceUrl.EndsWith(".txt"); return resourceUrl.StartsWith("/logfile/") && resourceUrl.EndsWith(".txt");
} }
} }
} }

@ -14,7 +14,7 @@ namespace NzbDrone.Api.Logs
public LogFileModule(IAppFolderInfo appFolderInfo, public LogFileModule(IAppFolderInfo appFolderInfo,
IDiskProvider diskProvider) IDiskProvider diskProvider)
: base("log/files") : base("log/file")
{ {
_appFolderInfo = appFolderInfo; _appFolderInfo = appFolderInfo;
_diskProvider = diskProvider; _diskProvider = diskProvider;

@ -6,7 +6,7 @@ define(
], function (Backbone, StatusModel) { ], function (Backbone, StatusModel) {
return Backbone.Model.extend({ return Backbone.Model.extend({
url: function () { url: function () {
return StatusModel.get('urlBase') + '/log/' + this.get('filename'); return StatusModel.get('urlBase') + '/logfile/' + this.get('filename');
}, },
parse: function (contents) { parse: function (contents) {

@ -10,7 +10,7 @@ define(
render: function () { render: function () {
this.$el.empty(); this.$el.empty();
this.$el.html('<a href="{0}/log/{1}" class="no-router" target="_blank">Download</a>'.format(StatusModel.get('urlBase'), this.cellValue)); this.$el.html('<a href="{0}/logfile/{1}" class="no-router" target="_blank">Download</a>'.format(StatusModel.get('urlBase'), this.cellValue));
return this; return this;
} }

@ -6,7 +6,7 @@ define(
'System/Logs/Files/LogFileModel' 'System/Logs/Files/LogFileModel'
], function (Backbone, LogFileModel) { ], function (Backbone, LogFileModel) {
return Backbone.Collection.extend({ return Backbone.Collection.extend({
url : window.NzbDrone.ApiRoot + '/log/files', url : window.NzbDrone.ApiRoot + '/log/file',
model: LogFileModel, model: LogFileModel,
state: { state: {

Loading…
Cancel
Save