From bd2ebdd29e03425a8314a91b64a5943df83b7559 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 6 May 2021 22:46:11 +0300 Subject: Added logout functionality and updated navbar --- ExamTemplate/Web/Controllers/UserController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ExamTemplate/Web/Controllers') diff --git a/ExamTemplate/Web/Controllers/UserController.cs b/ExamTemplate/Web/Controllers/UserController.cs index f4b6edf..4a22de7 100644 --- a/ExamTemplate/Web/Controllers/UserController.cs +++ b/ExamTemplate/Web/Controllers/UserController.cs @@ -59,5 +59,13 @@ namespace ExamTemplate.Web.Controllers else return View(); } + + [HttpPost] + public async Task Logout() + { + await this._userService.LogoutAsync(); + + return RedirectToAction("Login"); + } } } -- cgit v1.2.3