Release Testing Final Stretch (#1952)
* Fixed a bug breaking ability to save server settings * Fixed a case where if a user updated appsetting.json, the DB wouldn't update to stay in alignment.
This commit is contained in:
parent
2d842f3783
commit
b7c9762956
3 changed files with 13 additions and 3 deletions
|
@ -32,6 +32,7 @@ using Microsoft.AspNetCore.Identity;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.ResponseCompression;
|
||||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
@ -294,8 +295,17 @@ public class Startup
|
|||
{
|
||||
// We don't update the index.html in local as we don't serve from there
|
||||
UpdateBaseUrlInIndex(basePath);
|
||||
}
|
||||
|
||||
// Update DB with what's in config
|
||||
var dataContext = serviceProvider.GetRequiredService<DataContext>();
|
||||
var setting = dataContext.ServerSetting.SingleOrDefault(x => x.Key == ServerSettingKey.BaseUrl);
|
||||
if (setting != null)
|
||||
{
|
||||
setting.Value = basePath;
|
||||
}
|
||||
|
||||
dataContext.SaveChanges();
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
"TokenKey": "super secret unguessable key",
|
||||
"Port": 5000,
|
||||
"IpAddresses": "",
|
||||
"BaseUrl": "/"
|
||||
"BaseUrl": "/joe/"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue