public async Task <IActionResult> RemoveChannel(Guid?id, string token, RemoveChannelModel model)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            if (token == null)
            {
                return(BadRequest());
            }

            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var list = await _listService.GetListAsync(id.Value);

            if (list == null)
            {
                return(NotFound());
            }
            if (TokenUtils.NotEqual(token, list.TokenString))
            {
                return(NotFound());
            }

            await _listService.RemoveChannelAsync(list.Id, model.ChannelId);

            return(RedirectToAction("Index"));
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async System.Threading.Tasks.Task <ApiException> ApiOffchainRemovechannelPostAsync(this IBitcoinApi operations, RemoveChannelModel model = default(RemoveChannelModel), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
 {
     using (var _result = await operations.ApiOffchainRemovechannelPostWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
        public async Task RemoveChannel([FromBody] RemoveChannelModel model)
        {
            var asset = await GetAsset(model.Asset);

            await _offchain.RemoveChannel(model.Multisig, asset);
        }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static ApiException ApiOffchainRemovechannelPost(this IBitcoinApi operations, RemoveChannelModel model = default(RemoveChannelModel))
 {
     return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IBitcoinApi)s).ApiOffchainRemovechannelPostAsync(model), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='model'>
 /// </param>
 public static ApiException ApiOffchainRemovechannelPost(this IBitcoinApi operations, RemoveChannelModel model = default(RemoveChannelModel))
 {
     return(operations.ApiOffchainRemovechannelPostAsync(model).GetAwaiter().GetResult());
 }