public JsonResult AddInlineKey(string caption, string answer, string botId) { if (string.IsNullOrEmpty(caption)) { return(Json(false)); } if (string.IsNullOrEmpty(answer)) { return(Json(false)); } if (string.IsNullOrEmpty(botId)) { return(Json(false)); } var inlineKeyDto = _inlineKeysRepository.AddInlineKey(new InlineKey { Caption = caption, Answer = answer, BotId = botId }); return(inlineKeyDto != null ? Json(inlineKeyDto.Transform()) : Json(false)); }
public IActionResult AddInlineKey(string caption, string answer, string botId) { _inlineKeysRepository.AddInlineKey(new InlineKey { Caption = caption, Answer = answer, BotId = botId }); return(Redirect("/bot?id=" + botId)); }