using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;

namespace HackSystem.WebAPI.Controllers;

public class HomeController : Controller
{
    private readonly ILogger<HomeController> logger;

    public HomeController(ILogger<HomeController> logger)
    {
        this.logger = logger;
    }

    public IActionResult Index()
    {
        return this.View();
    }

    [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
    public IActionResult HackSystemError()
    {
        return this.Problem(
            detail: Activity.Current?.Id ?? this.HttpContext.TraceIdentifier,
            title: "Hack System Error");
    }
}
