aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/Endpoints/Account/LogoutEndpoint.cs
blob: de03e8e2238ffe38775a94ab0c9fbe0925b92d84 (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 : EndpointBase
{
    private readonly UserService _userService;

    public LogoutEndpoint(UserService userService) {
        _userService = userService;
    }

    [HttpGet("~/account/logout")]
    public async Task<ActionResult> Handle() {
        await _userService.LogOutUserAsync(HttpContext);
        return Ok();
    }
}