aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers/BookmarkTimelineController.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
commite16c958e5ba47834dc1624e09ed8e5074a60d1c6 (patch)
treeaf8de5669e0ade7d1425d7c5599d438a6cf1c38c /BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
parent29453339a7ba744dc19f730ffbd71d6bff01f25b (diff)
downloadtimeline-e16c958e5ba47834dc1624e09ed8e5074a60d1c6.tar.gz
timeline-e16c958e5ba47834dc1624e09ed8e5074a60d1c6.tar.bz2
timeline-e16c958e5ba47834dc1624e09ed8e5074a60d1c6.zip
refator: ...
Diffstat (limited to 'BackEnd/Timeline/Controllers/BookmarkTimelineController.cs')
-rw-r--r--BackEnd/Timeline/Controllers/BookmarkTimelineController.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
index d941013f..e7ffa5c5 100644
--- a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
+++ b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
@@ -8,7 +8,6 @@ using Timeline.Models.Validation;
using Timeline.Services.Api;
using Timeline.Services.Mapper;
using Timeline.Services.Timeline;
-using Timeline.Services.User;
namespace Timeline.Controllers
{
@@ -21,18 +20,18 @@ namespace Timeline.Controllers
{
private readonly IBookmarkTimelineService _service;
private readonly ITimelineService _timelineService;
- private readonly TimelineMapper _timelineMapper;
+ private readonly IGenericMapper _mapper;
- public BookmarkTimelineController(IBookmarkTimelineService service, ITimelineService timelineService, TimelineMapper timelineMapper)
+ public BookmarkTimelineController(IBookmarkTimelineService 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>