using Application.Abstractions.Messaging; using Application.Abstractions.YouTube; using SharedKernel.Results; namespace Application.Features.Admin.Channel.YouTubePubSub.Unsubscribe; internal sealed class Handler(IYouTubePubSubService pubSubService) : ICommandHandler { public async Task Handle(Command request, CancellationToken ct) { if (string.IsNullOrWhiteSpace(request.YouTubeChannelID)) { return Result.Failure(Error.Problem("YouTubePubSub.ChannelIDRequired", "YouTube Channel ID가 필요합니다.")); } await pubSubService.UnsubscribeAsync(request.YouTubeChannelID, ct); return Result.Success(); } }