File tree Expand file tree Collapse file tree
API/Controller/Account/Authenticated Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ,
You can’t perform that action at this time.
0 commit comments