HomeController.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using System.Threading.Tasks;
  6. using Microsoft.AspNetCore.Mvc;
  7. using Microsoft.Extensions.Logging;
  8. using GreenTree.Maschinenbestellungen.Web.Models;
  9. using GreenTree.Maschinenbestellungen.Domain.Model;
  10. using Microsoft.AspNetCore.Authorization;
  11. using Microsoft.AspNetCore.Authentication.Cookies;
  12. using GreenTree.Maschinenbestellungen.Services.Notification;
  13. using Microsoft.Extensions.Options;
  14. using GreenTree.Maschinenbestellungen.Web.Configuration;
  15. namespace GreenTree.Maschinenbestellungen.Web.Controllers
  16. {
  17. public class HomeController : Controller
  18. {
  19. private readonly ILogger<HomeController> _logger;
  20. private readonly INotificationService _mailNotificationService;
  21. public HomeController(
  22. ILogger<HomeController> logger,
  23. INotificationService mailNotificationService,
  24. IOptionMonitoringService optionMonitoringService)
  25. {
  26. _logger = logger;
  27. _mailNotificationService = mailNotificationService;
  28. }
  29. [Authorize]
  30. public IActionResult Index()
  31. {
  32. return View();
  33. }
  34. [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
  35. public IActionResult Error()
  36. {
  37. return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
  38. }
  39. }
  40. }