Lots of cleanup

This commit is contained in:
Joseph Milazzo 2021-02-07 12:02:47 -06:00
parent bd5a1338c4
commit 077e5f798a
28 changed files with 80 additions and 55 deletions

View file

@ -1,8 +1,9 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using API.DTOs;
using API.Entities;
using API.Entities.Enums;
using API.Extensions;
using API.Helpers.Converters;
using API.Interfaces;
@ -62,6 +63,13 @@ namespace API.Controllers
setting.Value = updateSettingsDto.TaskScan;
_unitOfWork.SettingsRepository.Update(setting);
}
if (setting.Key == ServerSettingKey.Port && updateSettingsDto.Port + "" != setting.Value)
{
setting.Value = updateSettingsDto.Port + "";
Environment.SetEnvironmentVariable("KAVITA_PORT", setting.Value);
_unitOfWork.SettingsRepository.Update(setting);
}
}
if (_unitOfWork.HasChanges() && await _unitOfWork.Complete())