diff options
author | crupest <crupest@outlook.com> | 2021-01-07 20:14:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-07 20:14:55 +0800 |
commit | e02871ff8bba7fccebdaaeea29141ed5e3289c09 (patch) | |
tree | 67128b91d6cfd08c54c9e745e7bf2abbdf1f20f4 /BackEnd/Timeline/Controllers/BookmarkTimelineController.cs | |
parent | 5ad1b1f0191ee1131e7808c8fcb0484ba29c0d4d (diff) | |
parent | ffe44ba70c9e5c6a01179c7e2f4185543cbc441c (diff) | |
download | timeline-e02871ff8bba7fccebdaaeea29141ed5e3289c09.tar.gz timeline-e02871ff8bba7fccebdaaeea29141ed5e3289c09.tar.bz2 timeline-e02871ff8bba7fccebdaaeea29141ed5e3289c09.zip |
Merge pull request #203 from crupest/back-dev
refactor: Make mapper a service. Fix #202.
Diffstat (limited to 'BackEnd/Timeline/Controllers/BookmarkTimelineController.cs')
-rw-r--r-- | BackEnd/Timeline/Controllers/BookmarkTimelineController.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs index 7412232d..64cb8afa 100644 --- a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs +++ b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs @@ -19,11 +19,13 @@ namespace Timeline.Controllers {
private readonly IBookmarkTimelineService _service;
private readonly ITimelineService _timelineService;
+ private readonly TimelineMapper _timelineMapper;
- public BookmarkTimelineController(IBookmarkTimelineService service, ITimelineService timelineService)
+ public BookmarkTimelineController(IBookmarkTimelineService service, ITimelineService timelineService, TimelineMapper timelineMapper)
{
_service = service;
_timelineService = timelineService;
+ _timelineMapper = timelineMapper;
}
/// <summary>
@@ -38,7 +40,7 @@ namespace Timeline.Controllers {
var ids = await _service.GetBookmarks(this.GetUserId());
var timelines = await _timelineService.GetTimelineList(ids);
- return Ok(timelines.MapToHttp(Url));
+ return await _timelineMapper.MapToHttp(timelines, Url);
}
/// <summary>
|