From e16c958e5ba47834dc1624e09ed8e5074a60d1c6 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 28 Apr 2021 19:20:40 +0800 Subject: refator: ... --- BackEnd/Timeline/Controllers/HighlightTimelineController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'BackEnd/Timeline/Controllers/HighlightTimelineController.cs') 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> Map(List timelines) { - return _timelineMapper.MapToHttp(timelines, Url, this.GetOptionalUserId(), this.UserHasPermission(UserPermission.AllTimelineManagement)); + return _mapper.MapListAsync(timelines, Url, User); } /// -- cgit v1.2.3