diff options
| author | crupest <crupest@outlook.com> | 2022-03-09 16:49:02 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-03-09 16:49:02 +0800 |
| commit | aef73578b567f37cbe24991caa5fde536e96c378 (patch) | |
| tree | f29895cd4597717d716476ebb0f6b8de3d921458 /BackEnd/Timeline/Services | |
| parent | 331c238b337d9d8f7b4e051712a95f45548debf5 (diff) | |
| download | timeline-aef73578b567f37cbe24991caa5fde536e96c378.tar.gz timeline-aef73578b567f37cbe24991caa5fde536e96c378.tar.bz2 timeline-aef73578b567f37cbe24991caa5fde536e96c378.zip | |
Migrate to .NET Core 6.0!
Diffstat (limited to 'BackEnd/Timeline/Services')
| -rw-r--r-- | BackEnd/Timeline/Services/Mapper/TimelineMapper.cs | 4 | ||||
| -rw-r--r-- | BackEnd/Timeline/Services/Mapper/UserMapper.cs | 6 | ||||
| -rw-r--r-- | BackEnd/Timeline/Services/Timeline/MarkdownProcessor.cs | 2 |
3 files changed, 6 insertions, 6 deletions
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 })!
)
);
}
diff --git a/BackEnd/Timeline/Services/Timeline/MarkdownProcessor.cs b/BackEnd/Timeline/Services/Timeline/MarkdownProcessor.cs index d338ba5e..ef8022c0 100644 --- a/BackEnd/Timeline/Services/Timeline/MarkdownProcessor.cs +++ b/BackEnd/Timeline/Services/Timeline/MarkdownProcessor.cs @@ -40,7 +40,7 @@ namespace Timeline.Services.Timeline nameof(TimelinePostController.DataGet),
nameof(TimelinePostController)[0..^nameof(Controller).Length],
new { timeline, post, data_index = dataIndex }
- )
+ )!
);
}
|
