pull/2194/head
Jamie Rees 7 years ago
parent b80ef04ab7
commit 0ce9fb2df9

@ -81,6 +81,7 @@ namespace Ombi.Store.Repository
public void Update(GlobalSettings entity)
{
Db.Update(entity);
//_cache.Remove(GetName(entity.SettingsName));
Db.SaveChanges();
}

@ -82,7 +82,7 @@ namespace Ombi
ctx.SaveChanges();
}
}
else if(!baseUrl.Equals(dbBaseUrl.Value))
else if(baseUrl.HasValue() && !baseUrl.Equals(dbBaseUrl.Value))
{
dbBaseUrl.Value = baseUrl;
ctx.SaveChanges();

@ -173,26 +173,22 @@ namespace Ombi
settings.ApiKey = Guid.NewGuid().ToString("N");
ombiService.SaveSettings(settings);
}
if (settings.BaseUrl.HasValue())
{
app.UsePathBase(settings.BaseUrl);
}
else
// Check if it's in the startup args
var appConfig = serviceProvider.GetService<IApplicationConfigRepository>();
var baseUrl = appConfig.Get(ConfigurationTypes.BaseUrl).Result;
if (baseUrl != null)
{
// Check if it's in the startup args
var appConfig = serviceProvider.GetService<IApplicationConfigRepository>();
var baseUrl = appConfig.Get(ConfigurationTypes.BaseUrl).Result;
if (baseUrl != null)
if (baseUrl.Value.HasValue())
{
if (baseUrl.Value.HasValue())
{
settings.BaseUrl = baseUrl.Value;
ombiService.SaveSettings(settings);
app.UsePathBase(settings.BaseUrl);
}
settings.BaseUrl = baseUrl.Value;
ombiService.SaveSettings(settings);
}
}
if (settings.BaseUrl.HasValue())
{
app.UsePathBase(settings.BaseUrl);
}
app.UseHangfireServer(new BackgroundJobServerOptions { WorkerCount = 1, ServerTimeout = TimeSpan.FromDays(1), ShutdownTimeout = TimeSpan.FromDays(1)});
app.UseHangfireDashboard(settings.BaseUrl.HasValue() ? $"{settings.BaseUrl}/hangfire" : "/hangfire",

Loading…
Cancel
Save