Some checks are pending
Deploy ASP.NET MVC to OCI / build-and-deploy (push) Waiting to run
54 lines
1.4 KiB
C#
54 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.Extensions.Caching.Memory;
|
|
using OnlyOneAccessTemplate.Services;
|
|
using OnlyOneAccessTemplate.Models;
|
|
|
|
namespace OnlyOneAccessTemplate.Controllers
|
|
{
|
|
public class HomeController : BaseController
|
|
{
|
|
public HomeController(
|
|
ISiteConfigurationService siteConfig,
|
|
ILanguageService languageService,
|
|
ISeoService seoService,
|
|
IMemoryCache cache,
|
|
IConfiguration configuration)
|
|
: base(siteConfig, languageService, seoService, cache, configuration)
|
|
{
|
|
}
|
|
|
|
[Route("")]
|
|
[Route("pt")]
|
|
[Route("br")]
|
|
public IActionResult Index()
|
|
{
|
|
var language = GetCurrentLanguage();
|
|
var siteConfig = _siteConfig.GetConfiguration(language);
|
|
|
|
ViewBag.PageTitle = siteConfig.SiteTitle;
|
|
ViewBag.PageDescription = siteConfig.SiteDescription;
|
|
ViewBag.CurrentPage = "home";
|
|
|
|
return View(siteConfig);
|
|
}
|
|
|
|
[Route("privacy")]
|
|
public IActionResult Privacy()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[Route("terms")]
|
|
public IActionResult Terms()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
}
|
|
} |