aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/V2/UserV2Controller.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-12 18:54:20 +0800
committercrupest <crupest@outlook.com>2022-04-12 18:54:20 +0800
commit8ddb8a46d065b4c6ab8241e602fdfb7afe687b8d (patch)
tree28eff1f6e4ccdac13ee971fbdc21c4017288e2f2 /BackEnd/Timeline/Controllers/V2/UserV2Controller.cs
parentbcdb0e737710052018d781b8ffd197bd11644553 (diff)
downloadtimeline-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.cs5
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));