aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Models
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-03-10 03:10:34 +0800
committercrupest <crupest@outlook.com>2020-03-10 03:10:34 +0800
commit2f9da0048893aacb7ffbfcae50ea5e0c8f840dbc (patch)
tree5d0f20cd5eec5050719dc83b08e50fa5179402dc /Timeline/Models
parent84079146cf4c179cfe2770386dcd9f1cd1e7b14a (diff)
downloadtimeline-2f9da0048893aacb7ffbfcae50ea5e0c8f840dbc.tar.gz
timeline-2f9da0048893aacb7ffbfcae50ea5e0c8f840dbc.tar.bz2
timeline-2f9da0048893aacb7ffbfcae50ea5e0c8f840dbc.zip
...
Diffstat (limited to 'Timeline/Models')
-rw-r--r--Timeline/Models/Http/Timeline.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Timeline/Models/Http/Timeline.cs b/Timeline/Models/Http/Timeline.cs
index 144cca7c..637a775d 100644
--- a/Timeline/Models/Http/Timeline.cs
+++ b/Timeline/Models/Http/Timeline.cs
@@ -64,7 +64,7 @@ namespace TimelineApp.Models.Http
var urlHelper = _urlHelperFactory.GetUrlHelper(_actionContextAccessor.ActionContext);
- return new TimelineInfoLinks
+ return new TimelineInfoLinks
{
Self = urlHelper.ActionLink(nameof(TimelineController.TimelineGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { source.Name }),
Posts = urlHelper.ActionLink(nameof(TimelineController.PostListGet), nameof(TimelineController)[0..^nameof(Controller).Length], new { source.Name })
@@ -114,6 +114,9 @@ namespace TimelineApp.Models.Http
public TimelineInfoAutoMapperProfile()
{
CreateMap<Timeline, TimelineInfo>().ForMember(u => u._links, opt => opt.MapFrom<TimelineInfoLinksValueResolver>());
+ CreateMap<TimelinePost, TimelinePostInfo>();
+ CreateMap<ITimelinePostContent, TimelinePostContentInfo>().ConvertUsing<TimelinePostConverter>();
+ CreateMap<TimelinePatchRequest, TimelineChangePropertyRequest>();
}
}
}