Strip //, /* */ and XML doc comments from all backend .cs files, and JS/TS/CSS/HTML comments from web-player source (.ts, .svelte, .css), per the project's no-comments convention.
18 lines
731 B
C#
18 lines
731 B
C#
using Mediator;
|
|
using Musify.Application.Configuration.Responses;
|
|
|
|
namespace Musify.Application.Configuration
|
|
{
|
|
|
|
public record GetPlaybackPublicConfigQuery : IQuery<PlaybackPublicConfigResponse>;
|
|
|
|
public class GetPlaybackPublicConfigQueryHandler(PlaybackConfiguration playbackConfiguration)
|
|
: IQueryHandler<GetPlaybackPublicConfigQuery, PlaybackPublicConfigResponse>
|
|
{
|
|
public ValueTask<PlaybackPublicConfigResponse> Handle(GetPlaybackPublicConfigQuery query, CancellationToken cancellationToken) =>
|
|
ValueTask.FromResult(new PlaybackPublicConfigResponse(
|
|
playbackConfiguration.AllowAnonymousListening,
|
|
playbackConfiguration.AnonymousFragmentSeconds));
|
|
}
|
|
}
|