Add project files.
This commit is contained in:
24
ConfigurationPannel/Pages/Index.cshtml.cs
Normal file
24
ConfigurationPannel/Pages/Index.cshtml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ConfigurationPannel.Pages
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly ILogger<IndexModel> _logger;
|
||||
|
||||
public IndexModel(ILogger<IndexModel> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
{
|
||||
if (User.Identity?.IsAuthenticated == true)
|
||||
{
|
||||
return RedirectToPage("/Configure");
|
||||
}
|
||||
return RedirectToPage("/Login");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user