Manarah/Manarah.App/Controllers/HomeController.cs
2024-03-28 22:29:14 +00:00
Ask

37 lines
1.0 KiB
C#

{884ee4b45aa2d2800ce35bb5686af776e5d57879 true 1048 HomeController.cs 0xc001ed2a10}

using Manarah.App.Models;
using Manarah.App.Services;
using Microsoft.AspNetCore.Mvc;
using System.Diagnostics;
namespace Manarah.App.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
private readonly ServerService _serverService;
public HomeController(ILogger<HomeController> logger, ServerService serverService)
{
_logger = logger;
_serverService = serverService;
}
public async Task<IActionResult> IndexAsync()
{
var serverList = await _serverService.GetServersDashboardAsync();
return View(serverList);
}
public IActionResult Privacy()
{
return View();
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}
}