a79d8282dc
- 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
13 lines
544 B
C#
13 lines
544 B
C#
using Nexus.Api.Data;
|
|
|
|
namespace Nexus.Api.Repositories;
|
|
|
|
public interface IActivityRepository
|
|
{
|
|
Task<List<ActivityEvent>> GetRecentAsync(int take, CancellationToken ct = default);
|
|
Task<(List<ActivityEvent> Items, int TotalCount)> GetPagedAsync(
|
|
string? type, string? sort, int page, int pageSize, CancellationToken ct = default);
|
|
Task<List<ActivityEvent>> GetByAgentAsync(string agentId, int take, CancellationToken ct = default);
|
|
Task<ActivityEvent> AddAsync(ActivityEvent activity, CancellationToken ct = default);
|
|
}
|