using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using backstage.Helpers;
using backstage.Models;

using System.Net.Http;

namespace backstage.Controllers
{


    [Authorize]
    public class HomeController : Controller
    {

        private readonly IConfiguration _config;
        private readonly ICallApi _callApi;
        /// <summary>
        /// 讀取組態用
        /// </summary>

        public HomeController(IConfiguration config, ICallApi callApi)
        {
            _config = config;
            _callApi = callApi;
        }





        public async Task<IActionResult> Index()
        {
            ResultModel result = new ResultModel();




            return View();
        }


        public IActionResult Error()
        {
            return View();
        }

        public IActionResult AccessDenied()
        {
            TempData["IsSuccess"] = false;
            TempData["msg"] = "您沒有訪問此頁面的權限。";


            return RedirectToAction("Index");
        }






    }
}