aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/Endpoints/Account/DeleteEndpoint.cs
blob: daf55f2d582a5ce7a2bbfccb17b8ef5c148c25bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
namespace Quality.Storage.Api.Endpoints.Account;

public class DeleteEndpoint(UserService userService) : EndpointBase
{
	[HttpDelete("~/account/delete")]
	public async Task<ActionResult> Handle() {
		await userService.MarkUserAsDeletedAsync(LoggedInUser.Id, LoggedInUser.Id);
		await userService.LogOutUserAsync(HttpContext);
		return Ok();
	}
}