コード例 #1
0
        public async Task <IActionResult> DisplayArchive()
        {
            try
            {
                var userId = TokenUserId();
                if (userId != 0)
                {
                    IList <DisplayResponceModel> Data = await note.DisplayArchive(userId);

                    if (Data != null)
                    {
                        return(Ok(new { success = true, Meassage = "Display archive notes operation is successful", Data }));
                    }
                    else
                    {
                        return(BadRequest(new { success = false, Meassage = "Display archive 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 }));
            }
        }