refactor: Clean Architecture mit Repository Pattern, Controllern und DTOs
- 15 Controller-Klassen ersetzen Minimal APIs in Program.cs - Repository Pattern mit Interfaces + Implementierungen (Project, Task, Activity, User) - AuthService verwendet jetzt IUserRepository statt direktem DbContext-Zugriff - SecurityHeadersMiddleware als eigenständige Middleware-Klasse - PathSecurityHelper als gemeinsamer Helper für Pfadvalidierung - DTOs in eigenem Namespace Nexus.Api.DTOs - EF-Entities in Nexus.Api.Data (vorher Nexus.Api.Domain) - Program.cs auf DI-Registrierung + Middleware reduziert - Alle 43 Endpoints unverändert erhalten - Build + 3/3 Tests erfolgreich
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Nexus.Api.Domain;
|
||||
using Nexus.Api.Data;
|
||||
|
||||
namespace Nexus.Api.Integrations;
|
||||
|
||||
@@ -37,4 +37,3 @@ public interface IModelProvider
|
||||
string Name { get; }
|
||||
Task<IReadOnlyCollection<ModelProviderStatus>> GetModelsAsync(CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Nexus.Api.Domain;
|
||||
using Nexus.Api.Data;
|
||||
|
||||
namespace Nexus.Api.Integrations;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Net.Http.Json;
|
||||
using Nexus.Api.Domain;
|
||||
using Nexus.Api.Data;
|
||||
|
||||
namespace Nexus.Api.Integrations;
|
||||
|
||||
@@ -34,4 +34,3 @@ public sealed class OllamaProvider(HttpClient client) : IModelProvider
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ using System.Diagnostics;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using Nexus.Api.Domain;
|
||||
using Nexus.Api.Data;
|
||||
|
||||
namespace Nexus.Api.Integrations;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user