Ejemplo n.º 1
0
        public async Task <IActionResult> DisplayLabel(string labelName)
        {
            try
            {
                var userId = TokenUserId();
                if (userId != 0)
                {
                    IList <DisplayResponceModel> Data = await note.DisplayLabel(labelName, userId);

                    if (Data != null)
                    {
                        return(Ok(new { success = true, Meassage = "Display Label notes operation is successful", Data }));
                    }
                    else
                    {
                        return(BadRequest(new { success = false, Meassage = "Display Label notes operation is not successful" }));
                    }
                }
                else
                {
                    return(BadRequest(new { success = false, Meassage = "Invalid user" }));
                }
            }
            catch (Exception e)
            {
                return(BadRequest(new { success = false, Meassage = e.Message }));
            }
        }