aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/Endpoints/Account/LogoutEndpoint.cs
blob: 064fa9facd91709db6165e764a7fee77a9c674ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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();
    }
}