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 | eba8e9698c09b805d8ac2a8f58db93b947ac29e3 (patch) | |
tree | c3bf0aef9d80c19e9a71e9e9aaab16b8364db15b /Timeline/Services/UserService.cs | |
parent | cc62df19e5f8aa216660915f46ff290c8eeab1d0 (diff) | |
download | timeline-eba8e9698c09b805d8ac2a8f58db93b947ac29e3.tar.gz timeline-eba8e9698c09b805d8ac2a8f58db93b947ac29e3.tar.bz2 timeline-eba8e9698c09b805d8ac2a8f58db93b947ac29e3.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)
|