public async Task <IActionResult> SearchCollaborators(SearchRequestModel model) { try { if (model.Keyword != null && model.Keyword != string.Empty) { var userId = TokenUserId(); List <GetCollaboratorResponse> data = await note.SearchCollaborators(model.Keyword, userId); if (data.Count != 0) { return(Ok(new { success = true, Meassage = "Search Collaborators SucessessFully", data })); } else { return(BadRequest(new { success = false, Meassage = "Search Collaborators unsuceessful" })); } } else { return(BadRequest(new { success = false, Meassage = "Invalid Input!" })); } } catch (Exception e) { return(BadRequest(new { success = false, Meassage = e.Message })); } }