public async Task <IActionResult> DeleteNoteLabel(int NotelabelId) { try { if (NotelabelId != 0) { var userId = TokenUserId(); if (await note.DeleteNoteLabel(NotelabelId, userId)) { return(Ok(new { success = true, Message = "Label deleted" })); } else { return(BadRequest(new { success = false, Message = "Label did not deleted" })); } } else { return(BadRequest(new { success = false, Message = "Input should not be empty!!!" })); } } catch (Exception e) { return(BadRequest(new { success = false, e.Message })); } }