diff options
| author | crupest <crupest@outlook.com> | 2020-01-30 23:49:02 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2020-01-30 23:49:02 +0800 |
| commit | 49bd47fb0eb81a88cce135f7ff7c25637790e63b (patch) | |
| tree | 70ddc26cf29bdf4b19e9a746cac6017845e009fc /Timeline/Services | |
| parent | a1a2eede6942aef7d8c20f9e7fb25f53b2b63d86 (diff) | |
| download | timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.tar.gz timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.tar.bz2 timeline-49bd47fb0eb81a88cce135f7ff7c25637790e63b.zip | |
Finish reafctor, TODO: Database migration.
Diffstat (limited to 'Timeline/Services')
| -rw-r--r-- | Timeline/Services/TimelineService.cs | 2 | ||||
| -rw-r--r-- | Timeline/Services/UserService.cs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs index 89936aa2..16402f3e 100644 --- a/Timeline/Services/TimelineService.cs +++ b/Timeline/Services/TimelineService.cs @@ -295,7 +295,7 @@ namespace Timeline.Services {
if (entity.Content != null) // otherwise it is deleted
{
- var author = Mapper.Map<UserInfo>(UserService.GetUserById(entity.AuthorId));
+ var author = Mapper.Map<UserInfo>(await UserService.GetUserById(entity.AuthorId));
posts.Add(new TimelinePostInfo
{
Id = entity.Id,
diff --git a/Timeline/Services/UserService.cs b/Timeline/Services/UserService.cs index 1197bb73..d2dc969e 100644 --- a/Timeline/Services/UserService.cs +++ b/Timeline/Services/UserService.cs @@ -300,12 +300,14 @@ namespace Timeline.Services var administrator = info.Administrator ?? false;
var password = info.Password;
+ var nickname = info.Nickname;
var newEntity = new UserEntity
{
Username = username,
Password = _passwordService.HashPassword(password),
Roles = UserRoleConvert.ToString(administrator),
+ Nickname = nickname,
Version = 1
};
_databaseContext.Users.Add(newEntity);
|
