737c423d9c
Retire the three-card overview for a search + medium + genre browser over all releases. Adds q/genre filter params to the api/release paged read path, mirroring the existing api/track/page TrackFilter pattern.
38 lines
1.2 KiB
C#
38 lines
1.2 KiB
C#
using DeepDrftModels.DTOs;
|
|
using DeepDrftPublic.Client.Clients;
|
|
using Models.Common;
|
|
using NetBlocks.Models;
|
|
|
|
namespace DeepDrftPublic.Client.Services;
|
|
|
|
/// <summary>
|
|
/// <see cref="IReleaseDataService"/> backed by <see cref="ReleaseClient"/> (HTTP to the
|
|
/// <c>DeepDrft.API</c> backend). Used on both the SSR prerender and WASM interactive passes —
|
|
/// the release read surface is HTTP-only, so there is no separate in-process implementation.
|
|
/// </summary>
|
|
public class ReleaseClientDataService : IReleaseDataService
|
|
{
|
|
private readonly ReleaseClient _releaseClient;
|
|
|
|
public ReleaseClientDataService(ReleaseClient releaseClient)
|
|
{
|
|
_releaseClient = releaseClient;
|
|
}
|
|
|
|
public Task<ApiResult<PagedResult<ReleaseDto>>> GetPaged(
|
|
string? medium,
|
|
int page,
|
|
int pageSize,
|
|
string? sortColumn = null,
|
|
bool sortDescending = false,
|
|
string? search = null,
|
|
string? genre = null)
|
|
=> _releaseClient.GetPaged(medium, page, pageSize, sortColumn, sortDescending, search, genre);
|
|
|
|
public Task<ApiResult<ReleaseDto>> GetById(long id)
|
|
=> _releaseClient.GetById(id);
|
|
|
|
public Task<ApiResult<WaveformProfileDto?>> GetMixWaveform(long id)
|
|
=> _releaseClient.GetMixWaveform(id);
|
|
}
|