Remove downloads management features: delete DownloadsEndpoints and related API logic, remove associated frontend components and routes, and update documentation to reflect the removal of the downloads directory from the application structure.
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
namespace TeleWave.Application.Media.Downloads;
|
||||
|
||||
public sealed record DownloadFileDto(string RelativePath, string Name, long SizeBytes);
|
||||
@@ -1,5 +0,0 @@
|
||||
using LiteCqrs;
|
||||
|
||||
namespace TeleWave.Application.Media.Downloads;
|
||||
|
||||
public sealed record ListDownloadsQuery : IQuery<IReadOnlyList<DownloadFileDto>>;
|
||||
@@ -1,20 +0,0 @@
|
||||
using LiteCqrs;
|
||||
using TeleWave.Application.Common.Interfaces;
|
||||
|
||||
namespace TeleWave.Application.Media.Downloads;
|
||||
|
||||
public sealed class ListDownloadsQueryHandler(IMediaStorage storage)
|
||||
: IQueryHandler<ListDownloadsQuery, IReadOnlyList<DownloadFileDto>>
|
||||
{
|
||||
public Task<IReadOnlyList<DownloadFileDto>> Handle(
|
||||
ListDownloadsQuery query,
|
||||
CancellationToken cancellationToken
|
||||
)
|
||||
{
|
||||
IReadOnlyList<DownloadFileDto> files = storage
|
||||
.ListDownloads()
|
||||
.Select(d => new DownloadFileDto(d.RelativePath, d.Name, d.SizeBytes))
|
||||
.ToList();
|
||||
return Task.FromResult(files);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user