示例#1
0
        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));
        }
示例#2
0
 public async Task <IActionResult> GetAllTrail()
 {
     return(Json(new { data = await _trailRepo.GetAllAsync(SD.TrailApiPath, HttpContext.Session.GetString("JWToken")) }));
 }