aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-07 22:13:24 +0800
committerGitHub <noreply@github.com>2021-01-07 22:13:24 +0800
commit05132389cd2db33ab3bdeaa2fbfae25fc8db8882 (patch)
treedaaa39d8d1d72b10caaa92cb65ba1635237ef2dc /BackEnd/Timeline/Controllers
parent191b92a161c4fdad532dbf471f5c33f8f4a97a23 (diff)
parent0bb2cc098506963ebf9ee06ec94b43c8d388543c (diff)
downloadtimeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.tar.gz
timeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.tar.bz2
timeline-05132389cd2db33ab3bdeaa2fbfae25fc8db8882.zip
Merge pull request #204 from crupest/back-dev
Timeline info includes highlight and bookmark info.
Diffstat (limited to 'BackEnd/Timeline/Controllers')
-rw-r--r--BackEnd/Timeline/Controllers/BookmarkTimelineController.cs2
-rw-r--r--BackEnd/Timeline/Controllers/HighlightTimelineController.cs2
-rw-r--r--BackEnd/Timeline/Controllers/TimelineController.cs10
3 files changed, 7 insertions, 7 deletions
diff --git a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
index 4313115e..16793de6 100644
--- a/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
+++ b/BackEnd/Timeline/Controllers/BookmarkTimelineController.cs
@@ -40,7 +40,7 @@ namespace Timeline.Controllers
{
var ids = await _service.GetBookmarks(this.GetUserId());
var timelines = await _timelineService.GetTimelineList(ids);
- return await _timelineMapper.MapToHttp(timelines, Url);
+ return await _timelineMapper.MapToHttp(timelines, Url, this.GetOptionalUserId());
}
/// <summary>
diff --git a/BackEnd/Timeline/Controllers/HighlightTimelineController.cs b/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
index cc19cada..ea012f76 100644
--- a/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
+++ b/BackEnd/Timeline/Controllers/HighlightTimelineController.cs
@@ -38,7 +38,7 @@ namespace Timeline.Controllers
{
var ids = await _service.GetHighlightTimelines();
var timelines = await _timelineService.GetTimelineList(ids);
- return await _timelineMapper.MapToHttp(timelines, Url);
+ return await _timelineMapper.MapToHttp(timelines, Url, this.GetOptionalUserId());
}
/// <summary>
diff --git a/BackEnd/Timeline/Controllers/TimelineController.cs b/BackEnd/Timeline/Controllers/TimelineController.cs
index efc49952..b2e37b15 100644
--- a/BackEnd/Timeline/Controllers/TimelineController.cs
+++ b/BackEnd/Timeline/Controllers/TimelineController.cs
@@ -109,7 +109,7 @@ namespace Timeline.Controllers
}
var timelines = await _service.GetTimelines(relationship, visibilityFilter);
- var result = await _timelineMapper.MapToHttp(timelines, Url);
+ var result = await _timelineMapper.MapToHttp(timelines, Url, this.GetOptionalUserId());
return result;
}
@@ -168,7 +168,7 @@ namespace Timeline.Controllers
else
{
var t = await _service.GetTimeline(timelineId);
- var result = await _timelineMapper.MapToHttp(t, Url);
+ var result = await _timelineMapper.MapToHttp(t, Url, this.GetOptionalUserId());
return result;
}
}
@@ -363,7 +363,7 @@ namespace Timeline.Controllers
}
await _service.ChangeProperty(timelineId, _mapper.Map<TimelineChangePropertyParams>(body));
var t = await _service.GetTimeline(timelineId);
- var result = await _timelineMapper.MapToHttp(t, Url);
+ var result = await _timelineMapper.MapToHttp(t, Url, this.GetOptionalUserId());
return result;
}
@@ -448,7 +448,7 @@ namespace Timeline.Controllers
try
{
var timeline = await _service.CreateTimeline(body.Name, userId);
- var result = await _timelineMapper.MapToHttp(timeline, Url);
+ var result = await _timelineMapper.MapToHttp(timeline, Url, this.GetOptionalUserId());
return result;
}
catch (EntityAlreadyExistException e) when (e.EntityName == EntityNames.Timeline)
@@ -507,7 +507,7 @@ namespace Timeline.Controllers
{
await _service.ChangeTimelineName(timelineId, body.NewName);
var timeline = await _service.GetTimeline(timelineId);
- return await _timelineMapper.MapToHttp(timeline, Url);
+ return await _timelineMapper.MapToHttp(timeline, Url, this.GetOptionalUserId());
}
catch (EntityAlreadyExistException)
{