Changeset 6782104 for PostgreSqlDotnetCore/Controllers/HomeController.cs
- Timestamp:
- 08/20/24 16:13:49 (3 months ago)
- Branches:
- main
- Children:
- 63bd770
- Parents:
- 8f8226c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PostgreSqlDotnetCore/Controllers/HomeController.cs
r8f8226c r6782104 4 4 using PostgreSqlDotnetCore.Models; 5 5 using System.Diagnostics; 6 using System.Web.Mvc; 6 7 7 8 namespace PostgreSqlDotnetCore.Controllers 8 9 { 9 10 10 public class HomeController : Controller11 public class HomeController : BaseController 11 12 { 12 13 private ApplicationDbContext db = new ApplicationDbContext(); … … 15 16 private readonly ILogger<HomeController> _logger; 16 17 17 public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager) 18 public HomeController(ILogger<HomeController> logger, UserManager<IdentityUser> userManager) : base(userManager) 18 19 { 19 20 _logger = logger; … … 56 57 db.SaveChanges(); 57 58 } 58 59 // set if is authenticated 60 ViewBag.isAuthenticated = await getCrrentUser(); 59 61 } 60 62 63 } else 64 { 65 ViewBag.isAuthenticated = null; 61 66 } 62 67 ViewBag.ShowTopBar = true; 68 63 69 return View(); 64 70 } 65 71 66 public IActionResult Privacy()72 public async Task<IActionResult> PrivacyAsync() 67 73 { 74 75 // set if is authenticated 76 ViewBag.isAuthenticated = await getCrrentUser(); 68 77 return View(); 69 78 } 70 public IActionResult Contact()79 public async Task<IActionResult> ContactAsync() 71 80 { 81 // set if is authenticated 82 ViewBag.isAuthenticated = await getCrrentUser(); 72 83 return View(); 73 84 }
Note:
See TracChangeset
for help on using the changeset viewer.