diff options
author | crupest <crupest@outlook.com> | 2020-06-13 00:28:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-13 00:28:35 +0800 |
commit | d6e9ae92a782f747752d9e26504dc2f27e723f04 (patch) | |
tree | 57e3d021f6bd2aaa747e1e8fbffdf6a2636977f5 /Timeline/Services/UserService.cs | |
parent | b2dcd4529bfb80fa2f1e6095cd5c976d4e90ec8e (diff) | |
download | timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.tar.gz timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.tar.bz2 timeline-d6e9ae92a782f747752d9e26504dc2f27e723f04.zip |
refactor(back): Fix #100 .
Diffstat (limited to 'Timeline/Services/UserService.cs')
-rw-r--r-- | Timeline/Services/UserService.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Timeline/Services/UserService.cs b/Timeline/Services/UserService.cs index e0a5ab50..c20b180c 100644 --- a/Timeline/Services/UserService.cs +++ b/Timeline/Services/UserService.cs @@ -8,6 +8,7 @@ using Timeline.Entities; using Timeline.Helpers;
using Timeline.Models;
using Timeline.Models.Validation;
+using Timeline.Services.Exceptions;
using static Timeline.Resources.Services.UserService;
namespace Timeline.Services
@@ -197,7 +198,7 @@ namespace Timeline.Services private static void ThrowUsernameConflict()
{
- throw new ConflictException(ExceptionUsernameConflict);
+ throw new EntityAlreadyExistException(EntityNames.User, ExceptionUsernameConflict);
}
private static User CreateUserFromEntity(UserEntity entity)
|