mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Short circuit when Plex hasn't been setup. Added Miniprofiler
This commit is contained in:
parent
0f34885444
commit
5d18877b49
8 changed files with 86 additions and 5 deletions
|
@ -44,6 +44,8 @@ using PlexRequests.Helpers;
|
|||
using PlexRequests.Helpers.Analytics;
|
||||
using PlexRequests.UI.Models;
|
||||
|
||||
using StackExchange.Profiling;
|
||||
|
||||
using Action = PlexRequests.Helpers.Analytics.Action;
|
||||
|
||||
namespace PlexRequests.UI.Modules
|
||||
|
@ -76,8 +78,17 @@ namespace PlexRequests.UI.Modules
|
|||
|
||||
public async Task<Negotiator> Index()
|
||||
{
|
||||
var settings = await AuthService.GetSettingsAsync();
|
||||
return View["Index", settings];
|
||||
var profiler = MiniProfiler.Current;
|
||||
using (profiler.Step("Loading Index"))
|
||||
{
|
||||
using (profiler.Step("Loading AuthSettingsAsync and returning View"))
|
||||
{
|
||||
var settings = await AuthService.GetSettingsAsync();
|
||||
return View["Index", settings];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async Task<Response> LoginUser()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue