Files
Musify/backend/Hosts/Musify.Api/Endpoints/ConfigEndpoints.cs
T
Admin 389b3b9244 Add anonymous listening support and redesign web-player UI
Backend:
- Expose GET /config/playback so the frontend can detect whether
  anonymous listening is enabled without requiring auth
- Wire anonymous access through track streaming and YouTube resolve flows

Frontend:
- Allow browsing/listening without a session when the backend enables it
- Redesign Inicio, Sidebar and top bar with a new dark theme, typography,
  and layout (top bar with live quick-search, sticky/blurred on scroll)
- Populate Top música, Popular and Recomendados with real Musify +
  YouTube Music data instead of placeholders
- Various shape, spacing, color and animation refinements across the
  redesigned components
2026-09-11 01:29:37 +02:00

29 lines
934 B
C#

using Mediator;
using Musify.Application.Configuration;
using Musify.Application.Configuration.Responses;
namespace Musify.Api.Endpoints;
public static class ConfigEndpoints
{
public static IEndpointRouteBuilder MapConfigEndpoints(this IEndpointRouteBuilder app)
{
var group = app.MapGroup("/config")
.WithTags("Config");
group.MapGet("/playback", GetPlaybackPublicConfig)
.WithName("GetPlaybackPublicConfig")
.WithSummary("Get The Public Playback Configuration (Whether Anonymous Listening Is Allowed). Works Anonymously.")
.Produces<PlaybackPublicConfigResponse>();
return app;
}
private static async Task<PlaybackPublicConfigResponse> GetPlaybackPublicConfig(
IMediator mediator,
CancellationToken cancellationToken)
{
return await mediator.Send(new GetPlaybackPublicConfigQuery(), cancellationToken);
}
}