public IActionResult GetAllThreads() { List <Thread> threadList = threadRepo.GetThreads(); if (threadList.Count != 0 && threadList != null) { return(Ok(threadList)); } else { return(NotFound()); } }
public IActionResult Index(int category = -1) { // Get thread objects // check if search results have already been queued // Pass thread list into Home List <Thread> threadList; if (category != -1) { threadList = threadRepo.GetCategoryOfThreads(category); } else { threadList = threadRepo.GetThreads(); } return(View("Home", threadList)); }