diff options
author | crupest <crupest@outlook.com> | 2022-04-12 18:54:20 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-12 18:54:20 +0800 |
commit | 8ddb8a46d065b4c6ab8241e602fdfb7afe687b8d (patch) | |
tree | 28eff1f6e4ccdac13ee971fbdc21c4017288e2f2 /BackEnd/Timeline/Controllers/V2/UserV2Controller.cs | |
parent | bcdb0e737710052018d781b8ffd197bd11644553 (diff) | |
download | timeline-8ddb8a46d065b4c6ab8241e602fdfb7afe687b8d.tar.gz timeline-8ddb8a46d065b4c6ab8241e602fdfb7afe687b8d.tar.bz2 timeline-8ddb8a46d065b4c6ab8241e602fdfb7afe687b8d.zip |
...
Diffstat (limited to 'BackEnd/Timeline/Controllers/V2/UserV2Controller.cs')
-rw-r--r-- | BackEnd/Timeline/Controllers/V2/UserV2Controller.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/BackEnd/Timeline/Controllers/V2/UserV2Controller.cs b/BackEnd/Timeline/Controllers/V2/UserV2Controller.cs index 2eb67d72..c84bab80 100644 --- a/BackEnd/Timeline/Controllers/V2/UserV2Controller.cs +++ b/BackEnd/Timeline/Controllers/V2/UserV2Controller.cs @@ -6,6 +6,7 @@ using Timeline.Auth; using Timeline.Models; using Timeline.Models.Http; using Timeline.Models.Validation; +using Timeline.Services; using Timeline.Services.Mapper; using Timeline.Services.User; @@ -134,6 +135,10 @@ namespace Timeline.Controllers.V2 await _userDeleteService.DeleteUserAsync(username); return NoContent(); } + catch (EntityNotExistException) + { + return NoContent(); + } catch (InvalidOperationOnRootUserException) { return UnprocessableEntity(new ErrorResponse(ErrorResponse.InvalidOperation, RootUserInvalidOperationMessage)); |