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 | e6d8183f6e5c9dec848fefa007b0e3ab428bbffa (patch) | |
tree | abe33b40e36a2b105879f23f6a93f8fe7153e288 /Timeline/Models/Http/UserInfo.cs | |
parent | 0dc8b59b435f978428c73bc28e2a424bc413c562 (diff) | |
download | timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.tar.gz timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.tar.bz2 timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.zip |
Fix a bug in url generation and add development database migration.
Diffstat (limited to 'Timeline/Models/Http/UserInfo.cs')
-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;
}
}
|