diff --git a/ErsatzTV/Controllers/Api/FFmpegProfileController.cs b/ErsatzTV/Controllers/Api/FFmpegProfileController.cs index c84cd41e9..97358accd 100644 --- a/ErsatzTV/Controllers/Api/FFmpegProfileController.cs +++ b/ErsatzTV/Controllers/Api/FFmpegProfileController.cs @@ -29,7 +29,7 @@ public class FFmpegProfileController(IMediator mediator) : ControllerBase return result.Match(Ok, () => NotFound()); } - [HttpPost("/api/ffmpeg/profiles/new", Name = "CreateFFmpegProfile")] + [HttpPost("/api/ffmpeg/profiles", Name = "CreateFFmpegProfile")] [Tags("FFmpeg")] [EndpointSummary("Create FFmpeg profile")] [EndpointGroupName("general")] @@ -42,7 +42,7 @@ public class FFmpegProfileController(IMediator mediator) : ControllerBase return result.Match(Ok, error => Problem(error.ToString())); } - [HttpPut("/api/ffmpeg/profiles/update", Name = "UpdateFFmpegProfile")] + [HttpPut("/api/ffmpeg/profiles", Name = "UpdateFFmpegProfile")] [Tags("FFmpeg")] [EndpointSummary("Update FFmpeg profile")] [EndpointGroupName("general")] @@ -55,7 +55,7 @@ public class FFmpegProfileController(IMediator mediator) : ControllerBase return result.Match(Ok, error => Problem(error.ToString())); } - [HttpDelete("/api/ffmpeg/delete/{id:int}", Name = "DeleteFFmpegProfile")] + [HttpDelete("/api/ffmpeg/profiles/{id:int}", Name = "DeleteFFmpegProfile")] [Tags("FFmpeg")] [EndpointSummary("Delete FFmpeg profile")] [EndpointGroupName("general")] diff --git a/ErsatzTV/Controllers/Api/MaintenanceController.cs b/ErsatzTV/Controllers/Api/MaintenanceController.cs index 1e7a218d0..15fbf6271 100644 --- a/ErsatzTV/Controllers/Api/MaintenanceController.cs +++ b/ErsatzTV/Controllers/Api/MaintenanceController.cs @@ -9,7 +9,7 @@ namespace ErsatzTV.Controllers.Api; public class MaintenanceController(IMediator mediator) : ControllerBase { - [HttpPost("/api/maintenance/gc", Name = "GarbageCollection")] + [HttpGet("/api/maintenance/gc", Name = "GarbageCollection")] [Tags("Maintenance")] [EndpointSummary("Garbage collect")] [EndpointGroupName("general")] @@ -19,7 +19,7 @@ public class MaintenanceController(IMediator mediator) : ControllerBase return Ok(); } - [HttpPost("/api/maintenance/empty-trash", Name = "EmptyTrash")] + [HttpPost("/api/maintenance/empty_trash", Name = "EmptyTrash")] [Tags("Maintenance")] [EndpointSummary("Empty trash")] [EndpointGroupName("general")] diff --git a/ErsatzTV/Controllers/Api/ScannerController.cs b/ErsatzTV/Controllers/Api/ScannerController.cs index 976cdc07c..391b95f43 100644 --- a/ErsatzTV/Controllers/Api/ScannerController.cs +++ b/ErsatzTV/Controllers/Api/ScannerController.cs @@ -14,8 +14,6 @@ public class ScannerController( ChannelWriter channelWriter) { [HttpPost("progress")] - [EndpointSummary("Scanner progress update")] - [EndpointGroupName("general")] public async Task Progress(Guid scanId, [FromBody] decimal percentComplete) { await scannerProxyService.Progress(scanId, percentComplete); @@ -23,8 +21,6 @@ public class ScannerController( } [HttpPost("items/reindex")] - [EndpointSummary("Scanner reindex items in search index")] - [EndpointGroupName("general")] public async Task UpdateItems( Guid scanId, [FromBody] List itemsToUpdate, @@ -39,8 +35,6 @@ public class ScannerController( } [HttpPost("items/remove")] - [EndpointSummary("Scanner remove items from search index")] - [EndpointGroupName("general")] public async Task RemoveItems( Guid scanId, [FromBody] List itemsToRemove, diff --git a/ErsatzTV/Controllers/Api/SmartCollectionController.cs b/ErsatzTV/Controllers/Api/SmartCollectionController.cs index 744000471..c751b9301 100644 --- a/ErsatzTV/Controllers/Api/SmartCollectionController.cs +++ b/ErsatzTV/Controllers/Api/SmartCollectionController.cs @@ -15,7 +15,7 @@ public class SmartCollectionController(IMediator mediator) : ControllerBase public async Task> GetAll() => await mediator.Send(new GetAllSmartCollectionsForApi()); - [HttpPost("/api/collections/smart/new", Name = "CreateSmartCollection")] + [HttpPost("/api/collections/smart", Name = "CreateSmartCollection")] [EndpointGroupName("general")] public async Task AddOne( [Required] [FromBody] @@ -26,7 +26,7 @@ public class SmartCollectionController(IMediator mediator) : ControllerBase return result.Match(Ok, error => Problem(error.ToString())); } - [HttpPut("/api/collections/smart/update", Name="UpdateSmartCollection")] + [HttpPut("/api/collections/smart", Name="UpdateSmartCollection")] [EndpointGroupName("general")] public async Task UpdateOne( [Required] [FromBody] @@ -36,11 +36,11 @@ public class SmartCollectionController(IMediator mediator) : ControllerBase return result.Match(Ok, error => Problem(error.ToString())); } - [HttpDelete("/api/collections/smart/delete/{id:int}", Name="DeleteSmartCollection")] + [HttpDelete("/api/collections/smart/{id:int}", Name="DeleteSmartCollection")] [EndpointGroupName("general")] public async Task DeleteSmartCollection(int id) { Either result = await mediator.Send(new DeleteSmartCollection(id)); - return result.Match(_ => Ok(), error => Problem(error.ToString())); + return result.Match(_ => NoContent(), error => Problem(error.ToString())); } }