feat(api): add route names and handler tests for picker list endpoints (#105)
The WIP GET /api/filler-presets, /api/watermarks, and /api/graphics-elements endpoints omitted the Name= route attribute used by the other API GET actions (e.g. FFmpegProfileController). Add Name = "GetFillerPresets" / "GetWatermarks" / "GetGraphicsElements" for consistency. Also add handler tests (FillerPresetHandlerTests, WatermarkHandlerTests, GraphicsElementHandlerTests) covering the GetAll*ForApi handlers using the InMemoryTvContext harness: multi-row projection to (Id, Name) DTOs, the empty-DB case, and the graphics-element ordering rule (named elements sort before elements whose projected Name equals FileName).
This commit is contained in:
@@ -9,7 +9,7 @@ namespace ErsatzTV.Controllers.Api;
|
||||
[ApiController]
|
||||
public class FillerPresetController(IMediator mediator) : ControllerBase
|
||||
{
|
||||
[HttpGet("/api/filler-presets")]
|
||||
[HttpGet("/api/filler-presets", Name = "GetFillerPresets")]
|
||||
[Tags("Filler Presets")]
|
||||
[EndpointSummary("Get all filler presets")]
|
||||
[EndpointGroupName("general")]
|
||||
|
||||
Reference in New Issue
Block a user