Code cleanup. Implemented ability to schedule Library Backups.
This commit is contained in:
parent
83b9394b17
commit
b4ee16d8d1
35 changed files with 217 additions and 91 deletions
|
|
@ -35,7 +35,7 @@ namespace API.Controllers
|
|||
[HttpPost("")]
|
||||
public async Task<ActionResult<ServerSettingDto>> UpdateSettings(ServerSettingDto updateSettingsDto)
|
||||
{
|
||||
_logger.LogInformation($"{User.GetUsername()} is updating Server Settings");
|
||||
_logger.LogInformation("{UserName} is updating Server Settings", User.GetUsername());
|
||||
|
||||
if (updateSettingsDto.CacheDirectory.Equals(string.Empty))
|
||||
{
|
||||
|
|
@ -72,9 +72,11 @@ namespace API.Controllers
|
|||
}
|
||||
}
|
||||
|
||||
if (!_unitOfWork.HasChanges()) return Ok("Nothing was updated");
|
||||
|
||||
if (_unitOfWork.HasChanges() && await _unitOfWork.Complete())
|
||||
{
|
||||
_logger.LogInformation("Server Settings updated.");
|
||||
_logger.LogInformation("Server Settings updated");
|
||||
return Ok(updateSettingsDto);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue