64 lines
1.6 KiB
C#
64 lines
1.6 KiB
C#
|
using System.Diagnostics;
|
||
|
using System.Web.Mvc;
|
||
|
using BlueWest.Data.Auth.Context.Users;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
using BlueWest.Views.Models;
|
||
|
using BlueWest.Views.Utils;
|
||
|
using Controller = Microsoft.AspNetCore.Mvc.Controller;
|
||
|
|
||
|
namespace BlueWest.Views.Controllers;
|
||
|
|
||
|
public class AccountController : UserController
|
||
|
{
|
||
|
private readonly ILogger<AccountController> _logger;
|
||
|
|
||
|
|
||
|
public AccountController(ApplicationUserManager userManager, ILogger<AccountController> logger) : base(userManager, logger)
|
||
|
{
|
||
|
_userManager = userManager;
|
||
|
_logger = logger;
|
||
|
}
|
||
|
public async Task<IActionResult> Index()
|
||
|
{
|
||
|
await OnEveryAction();
|
||
|
var user = await GetLoggedInUser();
|
||
|
return View(user);
|
||
|
}
|
||
|
|
||
|
public override void OnInitialization()
|
||
|
{
|
||
|
SetFooterMenu(LayoutCache.AccountRouteRecord.Children);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
public async Task<IActionResult> Curriculums()
|
||
|
{
|
||
|
await OnEveryAction();
|
||
|
|
||
|
return View("Curriculums/Index");
|
||
|
}
|
||
|
|
||
|
|
||
|
public async Task<IActionResult> Change()
|
||
|
{
|
||
|
await OnEveryAction();
|
||
|
return View("ChangePassword");
|
||
|
}
|
||
|
|
||
|
|
||
|
[Microsoft.AspNetCore.Mvc.Route("[controller]/upload")]
|
||
|
public async Task<IActionResult> UploadCurriculum()
|
||
|
{
|
||
|
await OnEveryAction();
|
||
|
return View("Curriculums/Upload");
|
||
|
}
|
||
|
|
||
|
|
||
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||
|
public async Task<IActionResult> Error()
|
||
|
{
|
||
|
return View(new ErrorViewModel {RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier});
|
||
|
}
|
||
|
|
||
|
}
|