aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-31 20:25:06 +0800
committercrupest <crupest@outlook.com>2020-01-31 20:25:06 +0800
commite6d8183f6e5c9dec848fefa007b0e3ab428bbffa (patch)
treeabe33b40e36a2b105879f23f6a93f8fe7153e288 /Timeline/Models
parent0dc8b59b435f978428c73bc28e2a424bc413c562 (diff)
downloadtimeline-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')
-rw-r--r--Timeline/Models/Http/UserInfo.cs7
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;
}
}