public async Task <ActionResult> UpdateEmoticon(string code) { var emoticonFile = Server.MapPath("~/Content/Images/EmoticonSet/Emoticon.json"); var model = await EmoticonReader.AdminGetEmoticon(emoticonFile, code); if (model == null) { return(ViewMessageModal(new ViewMessageModel(ViewMessageType.Danger, "Error", $"Emoticon '{code}' not found"))); } return(View("UpdateEmoticonModal", new UpdateEmoticonModel { Category = model.Category, Code = model.Code, Name = model.Name })); }
public async Task <ActionResult> GetEmoticons(DataTablesModel model) { var emoticonFile = Server.MapPath("~/Content/Images/EmoticonSet/Emoticon.json"); return(DataTable(await EmoticonReader.AdminGetEmoticons(emoticonFile, model))); }