Skip to content

Commit bb951bc

Browse files
committed
Make Deactivate return 204
1 parent 7c0166d commit bb951bc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

API/Controller/Account/Authenticated/Deactivate.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ public sealed partial class AuthenticatedAccountController
1010
/// <summary>
1111
/// Deactivate currently logged in account
1212
/// </summary>
13-
/// <response code="200">Done.</response>
13+
/// <response code="204">Done.</response>
1414
[HttpDelete]
15-
[ProducesResponseType<string>(StatusCodes.Status200OK, MediaTypeNames.Text.Plain)]
15+
[ProducesResponseType(StatusCodes.Status204NoContent)]
1616
[ProducesResponseType<OpenShockProblem>(StatusCodes.Status403Forbidden, MediaTypeNames.Application.ProblemJson)] // CannotDeactivatePrivledgedAccount
1717
public async Task<IActionResult> Deactivate()
1818
{
1919
var deactivationResult = await _accountService.DeactivateAccountAsync(CurrentUser.Id, CurrentUser.Id, deleteLater: true);
20-
return deactivationResult.Match(
21-
success => Ok("Account deactivated"),
20+
return deactivationResult.Match<IActionResult>(
21+
success => NoContent(),
2222
cannotDeactivatePrivledged => Problem(AccountActivationError.CannotDeactivateOrDeletePrivledgedAccount),
2323
alreadyDeactivated => Problem(AccountActivationError.AlreadyDeactivated),
2424
unauthorized => Problem(AccountActivationError.Unauthorized),

0 commit comments

Comments
 (0)