Example #1
0
        public async Task <IActionResult> CreateChannel([FromForm] CreateChannelViewModel model)
        {
            var channel = new Channel()
            {
                Caption = model.Caption, Name = model.Name, AdminId = model.AdminId
            };
            var result = await _ChannelService.CreateChannel(channel);

            if (result)
            {
                return(Ok(successfull));
            }
            return(BadRequest(failed));
        }