From e6d8183f6e5c9dec848fefa007b0e3ab428bbffa Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 31 Jan 2020 20:25:06 +0800 Subject: Fix a bug in url generation and add development database migration. --- Timeline/Models/Http/UserInfo.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Timeline/Models') 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; } } -- cgit v1.2.3