Přemístění + dodělání funkčnosti webu.

This commit is contained in:
Matěj Kubíček
2026-09-17 17:50:48 +02:00
parent 3a35d10227
commit f223721fbd
128 changed files with 714 additions and 172 deletions
@@ -0,0 +1,32 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using StuzkovakWeb.Data;
using StuzkovakWeb.Models;
namespace StuzkovakWeb.Controllers;
public class HomeController : Controller
{
private readonly AppDbContext _context;
public HomeController(AppDbContext context)
{
_context = context;
}
public IActionResult Index(Guid? id)
{
if (id == null) return View();
var invite = _context.Invites.FirstOrDefault(i => i.Id == id);
if (invite == null) return NotFound();
return View(invite);
}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
}
}