Fixes to the issues

pull/333/head
tidusjar 9 years ago
parent 5a1b606f01
commit 6f18c69f5f

@ -105,7 +105,8 @@ namespace PlexRequests.Core
SearchForMovies = true,
SearchForTvShows = true,
WeeklyRequestLimit = 0,
BaseUrl = baseUrl ?? string.Empty
BaseUrl = baseUrl ?? string.Empty,
CollectAnalyticData = true,
};
var s = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider()));
s.SaveSettings(defaultSettings);

@ -362,7 +362,7 @@ namespace PlexRequests.UI.Modules
return myIssues;
}
private async Task<Negotiator> RemoveIssue(int issueId)
private async Task<Response> RemoveIssue(int issueId)
{
try
{
@ -378,13 +378,13 @@ namespace PlexRequests.UI.Modules
await IssuesService.DeleteIssueAsync(issueId);
}
return View["Index"];
return Response.AsJson(new JsonResponseModel() { Result = true });
}
catch (Exception e)
{
Log.Error(e);
return View["Index"];
return Response.AsJson(new JsonResponseModel() { Result = false, Message = "Could not delete issue! Check the logs."});
}
}

@ -61,7 +61,7 @@
</div>
<script id="issue-template" type="text/x-handlebars-template">
<div>
<div id="{{id}}Template">
<div class="row">
<div class="col-md-3">
<div id="title">{{title}}</div>
@ -83,7 +83,7 @@
<div class="col-sm-1">
<a href="" id="{{id}}link" class="btn btn-sm btn-info-outline approve"><i class="fa fa-info"></i> Details</a>
<br />
<form action="@formAction/issues/remove" method="post">
<form action="@formAction/issues/remove" method="post" id="delete{{id}}">
<input id="issueId" name="issueId" value="{{id}}" hidden="hidden" />
<button type="submit" id="{{id}}" class="btn btn-sm btn-danger-outline dropdown-toggle delete">Remove</button>
</form>

Loading…
Cancel
Save