Ejemplo n.º 1
0
        public JsonResult AddTag(string token, string tag)
        {
            NoteTag noteTag = tagService.AddOrUpdateTag(GetUserIdByToken(token), tag);

            if (noteTag == null)
            {
                return(Json(new ApiRe()
                {
                    Ok = false, Msg = "添加标签失败"
                }, MyJsonConvert.GetLeanoteOptions()));
            }
            else
            {
                return(Json(noteTag, MyJsonConvert.GetLeanoteOptions()));
            }
        }