From aef73578b567f37cbe24991caa5fde536e96c378 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 9 Mar 2022 16:49:02 +0800 Subject: Migrate to .NET Core 6.0! --- BackEnd/Timeline/Services/Mapper/TimelineMapper.cs | 4 ++-- BackEnd/Timeline/Services/Mapper/UserMapper.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'BackEnd/Timeline/Services/Mapper') diff --git a/BackEnd/Timeline/Services/Mapper/TimelineMapper.cs b/BackEnd/Timeline/Services/Mapper/TimelineMapper.cs index 87bebbb3..2a0ba89f 100644 --- a/BackEnd/Timeline/Services/Mapper/TimelineMapper.cs +++ b/BackEnd/Timeline/Services/Mapper/TimelineMapper.cs @@ -90,8 +90,8 @@ namespace Timeline.Services.Mapper manageable: manageable, postable: postable, links: new HttpTimelineLinks( - self: urlHelper.ActionLink(nameof(TimelineController.TimelineGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { timeline = timelineName }), - posts: urlHelper.ActionLink(nameof(TimelinePostController.List), nameof(TimelinePostController)[0..^nameof(Controller).Length], new { timeline = timelineName }) + self: urlHelper.ActionLink(nameof(TimelineController.TimelineGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { timeline = timelineName })!, + posts: urlHelper.ActionLink(nameof(TimelinePostController.List), nameof(TimelinePostController)[0..^nameof(Controller).Length], new { timeline = timelineName })! ) ); } diff --git a/BackEnd/Timeline/Services/Mapper/UserMapper.cs b/BackEnd/Timeline/Services/Mapper/UserMapper.cs index 8855eef2..d8c9e294 100644 --- a/BackEnd/Timeline/Services/Mapper/UserMapper.cs +++ b/BackEnd/Timeline/Services/Mapper/UserMapper.cs @@ -27,9 +27,9 @@ namespace Timeline.Services.Mapper nickname: string.IsNullOrEmpty(entity.Nickname) ? entity.Username : entity.Nickname, permissions: (await _userPermissionService.GetPermissionsOfUserAsync(entity.Id, false)).ToStringList(), links: new HttpUserLinks( - self: urlHelper.ActionLink(nameof(UserController.Get), nameof(UserController)[0..^nameof(Controller).Length], new { entity.Username }), - avatar: urlHelper.ActionLink(nameof(UserAvatarController.Get), nameof(UserAvatarController)[0..^nameof(Controller).Length], new { entity.Username }), - timeline: urlHelper.ActionLink(nameof(TimelineController.TimelineGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { timeline = "@" + entity.Username }) + self: urlHelper.ActionLink(nameof(UserController.Get), nameof(UserController)[0..^nameof(Controller).Length], new { entity.Username })!, + avatar: urlHelper.ActionLink(nameof(UserAvatarController.Get), nameof(UserAvatarController)[0..^nameof(Controller).Length], new { entity.Username })!, + timeline: urlHelper.ActionLink(nameof(TimelineController.TimelineGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { timeline = "@" + entity.Username })! ) ); } -- cgit v1.2.3