diff options
author | crupest <crupest@outlook.com> | 2020-01-31 20:25:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-31 20:25:06 +0800 |
commit | a7fd42ddee50a8066a083c57b7940e4f9896dcb7 (patch) | |
tree | abe33b40e36a2b105879f23f6a93f8fe7153e288 /Timeline/Models/Http | |
parent | 45a6ca3a189a81060ae44d0764248547fe2b686c (diff) | |
download | timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.tar.gz timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.tar.bz2 timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.zip |
Fix a bug in url generation and add development database migration.
Diffstat (limited to 'Timeline/Models/Http')
-rw-r--r-- | Timeline/Models/Http/UserInfo.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Timeline/Models/Http/UserInfo.cs b/Timeline/Models/Http/UserInfo.cs index 5890a7a6..fee53ade 100644 --- a/Timeline/Models/Http/UserInfo.cs +++ b/Timeline/Models/Http/UserInfo.cs @@ -48,11 +48,12 @@ namespace Timeline.Models.Http }
var urlHelper = _urlHelperFactory.GetUrlHelper(_actionContextAccessor.ActionContext);
- return new UserInfoLinks
+ var result = new UserInfoLinks
{
- Avatar = urlHelper.ActionLink(nameof(UserAvatarController.Get), nameof(UserAvatarController), new { destination.Username }),
- Timeline = urlHelper.ActionLink(nameof(PersonalTimelineController.TimelineGet), nameof(PersonalTimelineController), new { destination.Username })
+ Avatar = urlHelper.ActionLink(nameof(UserAvatarController.Get), nameof(UserAvatarController)[0..^nameof(Controller).Length], new { destination.Username }),
+ Timeline = urlHelper.ActionLink(nameof(PersonalTimelineController.TimelineGet), nameof(PersonalTimelineController)[0..^nameof(Controller).Length], new { destination.Username })
};
+ return result;
}
}
|