public async Task <IActionResult> Index() { IndexVM listOfParksAndTrails = new IndexVM() { NationalParkList = await _npRepo.GetAllAsync(SD.NationalParkApiPath, HttpContext.Session.GetString("JWToken")), TrailList = await _trailRepo.GetAllAsync(SD.TrailApiPath, HttpContext.Session.GetString("JWToken")), }; return(View(listOfParksAndTrails)); }
public async Task <IActionResult> GetAllTrail() { return(Json(new { data = await _trailRepo.GetAllAsync(SD.TrailApiPath, HttpContext.Session.GetString("JWToken")) })); }