Moved BaseUrl from appsettings.json to Database and fixed an issue in UI for setting base url based on a hack, rather than asking backend for it. (#644)
This commit is contained in:
parent
e8e838d125
commit
977e364d5a
10 changed files with 52 additions and 26 deletions
|
@ -35,6 +35,15 @@ namespace API.Data.Repositories
|
|||
return _mapper.Map<ServerSettingDto>(settings);
|
||||
}
|
||||
|
||||
public ServerSettingDto GetSettingsDto()
|
||||
{
|
||||
var settings = _context.ServerSetting
|
||||
.Select(x => x)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
return _mapper.Map<ServerSettingDto>(settings);
|
||||
}
|
||||
|
||||
public Task<ServerSetting> GetSettingAsync(ServerSettingKey key)
|
||||
{
|
||||
return _context.ServerSetting.SingleOrDefaultAsync(x => x.Key == key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue