Adds TraktController (GET/POST /api/trakt/lists, GET/PUT/DELETE by id, POST .../match, GET /api/trakt/status) covering the API gap for SPA parity issue #142. Add/match/delete dispatch to the same ChannelWriter<IBackgroundServiceRequest> the classic Blazor "Trakt Lists" page uses, gated by the existing IEntityLocker (LockTrakt/ IsTraktLocked) singleton; GET /api/trakt/status wraps IsTraktLocked as the HTTP-observable substitute for the Blazor page's OnTraktChanged event. URL validation mirrors AddTraktListHandler.ValidateUrl's regexes (replicated, since that method is private to the handler and returns a handler-private record) so an obviously-invalid URL gets a synchronous 422 before dispatch. Adds TraktListResponseModel/PagedTraktListsResponseModel/ TraktStatusResponseModel DTOs, AddTraktListRequest/UpdateTraktListRequest, controller tests, ApiControllerSecurityTests + OpenApiErrorResponseContractTests coverage, and regenerates the checked-in OpenAPI document.
4 lines
93 B
C#
4 lines
93 B
C#
namespace ErsatzTV.Controllers.Api.Requests;
|
|
|
|
public record AddTraktListRequest(string Url);
|