aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-28 19:20:40 +0800
committercrupest <crupest@outlook.com>2021-04-28 19:20:40 +0800
commitd922b3241245c9bc1ca6cff8ac69dd7659a958f1 (patch)
treeecad89ac4933980a54b643d899c339c7d86ae900 /BackEnd/Timeline/Controllers/HighlightTimelineController.cs
parent66835dcd6812d40bca8d271a7773637f74aaa8d4 (diff)
downloadtimeline-d922b3241245c9bc1ca6cff8ac69dd7659a958f1.tar.gz
timeline-d922b3241245c9bc1ca6cff8ac69dd7659a958f1.tar.bz2
timeline-d922b3241245c9bc1ca6cff8ac69dd7659a958f1.zip
refator: ...
Diffstat (limited to 'BackEnd/Timeline/Controllers/HighlightTimelineController.cs')
-rw-r--r--BackEnd/Timeline/Controllers/HighlightTimelineController.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/BackEnd/Timeline/Controllers/HighlightTimelineController.cs b/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
index 4facc4a1..4e739056 100644
--- a/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
+++ b/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
@@ -21,18 +21,18 @@ namespace Timeline.Controllers
{
private readonly IHighlightTimelineService _service;
private readonly ITimelineService _timelineService;
- private readonly TimelineMapper _timelineMapper;
+ private readonly IGenericMapper _mapper;
- public HighlightTimelineController(IHighlightTimelineService service, ITimelineService timelineService, TimelineMapper timelineMapper)
+ public HighlightTimelineController(IHighlightTimelineService service, ITimelineService timelineService, IGenericMapper mapper)
{
_service = service;
_timelineService = timelineService;
- _timelineMapper = timelineMapper;
+ _mapper = mapper;
}
private Task<List<HttpTimeline>> Map(List<TimelineEntity> timelines)
{
- return _timelineMapper.MapToHttp(timelines, Url, this.GetOptionalUserId(), this.UserHasPermission(UserPermission.AllTimelineManagement));
+ return _mapper.MapListAsync<HttpTimeline>(timelines, Url, User);
}
/// <summary>