public async Task <IActionResult> UpdateChannelAsync(Guid channelId, [FromBody] TransportModels.Request.Channel.UpdateChannelRequest request) { var updateChannelRequest = new UpdateChannelRequest(GetCurrentSaasUserId(), channelId, request.Name) { PhotoUrl = request.PhotoUrl, Description = request.Description, WelcomeMessage = request.WelcomeMessage }; var channel = await _channelSocketService.UpdateChannelAsync(updateChannelRequest); return(Ok(channel)); }
public async Task <ChannelSummaryResponse> UpdateChannelAsync(UpdateChannelRequest request) { return(await ValidateAndExecuteAsync(request, new UpdateChannelRequestValidator(), new TaskReference <ChannelSummaryResponse>(async() => { var updateChannelRequest = new DomainRequest.Channel.UpdateChannelRequest(Context.GetSaasUserId(), request.ChannelId, request.Name) { PhotoUrl = request.PhotoUrl, Description = request.Description, WelcomeMessage = request.WelcomeMessage }; return await _channelSocketService.UpdateChannelAsync(updateChannelRequest); }), request.RequestId)); }