aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/Endpoints/Account/LogoutEndpoint.cs
diff options
context:
space:
mode:
Diffstat (limited to 'code/api/Endpoints/Account/LogoutEndpoint.cs')
-rw-r--r--code/api/Endpoints/Account/LogoutEndpoint.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/code/api/Endpoints/Account/LogoutEndpoint.cs b/code/api/Endpoints/Account/LogoutEndpoint.cs
new file mode 100644
index 0000000..064fa9f
--- /dev/null
+++ b/code/api/Endpoints/Account/LogoutEndpoint.cs
@@ -0,0 +1,16 @@
+namespace I2R.Storage.Api.Endpoints.Account;
+
+public class LogoutEndpoint : Base
+{
+ private readonly UserService _userService;
+
+ public LogoutEndpoint(UserService userService) {
+ _userService = userService;
+ }
+
+ [HttpGet("~/account/logout")]
+ public async Task<ActionResult> Handle() {
+ await _userService.LogOutUserAsync(HttpContext);
+ return Ok();
+ }
+} \ No newline at end of file