diff --git a/Controllers/LoginController.cs b/Controllers/LoginController.cs index 5bedcbe..65c0f6b 100644 --- a/Controllers/LoginController.cs +++ b/Controllers/LoginController.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; +using NuGet.Common; using SoftwayWeb.Models; using System.Text; @@ -79,5 +80,18 @@ namespace SoftwayWeb.Controllers return View(); } } + + #region Logout + + public IActionResult Logout() + { + helper = new SessionHelper(this); + helper.ClearFormatedKey("tok"); + + return RedirectToAction("Login","Login"); + } + + + #endregion Logout } } diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 50190e2..0c0436d 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -12,7 +12,8 @@