diff --git a/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs b/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs index 6186f3e..8d897ff 100644 --- a/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs +++ b/Endpoint/Configuration/Core/BackgroundTasks/ScheduleSyncService.cs @@ -9,7 +9,6 @@ using Mirea.Api.Endpoint.Sync; using System; using System.Threading; using System.Threading.Tasks; -using IServiceProvider = System.IServiceProvider; namespace Mirea.Api.Endpoint.Configuration.Core.BackgroundTasks; diff --git a/Endpoint/Controllers/Configuration/SetupController.cs b/Endpoint/Controllers/Configuration/SetupController.cs index e306092..d0033ea 100644 --- a/Endpoint/Controllers/Configuration/SetupController.cs +++ b/Endpoint/Controllers/Configuration/SetupController.cs @@ -161,13 +161,13 @@ public class SetupController( } else if (Directory.GetDirectories(path).Length != 0 || !Directory.GetFiles(path).Select(x => string.Equals(Path.GetFileName(x), "database.db3")).All(x => x)) + { throw new ControllerArgumentException("Such a folder exists. Enter a different name"); + } var filePath = Path.Combine(path, "database.db3"); var connectionString = $"Data Source={filePath}"; - //System.IO.File.Create(filePath); - var result = SetDatabase(connectionString, DbSettings.DatabaseEnum.Sqlite); foreach (var file in Directory.GetFiles(path))