From e71cb8e368d081747014f1434c5ee157660783f2 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 2 Feb 2020 00:31:33 +0800 Subject: ... --- Timeline/Controllers/PersonalTimelineController.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Timeline/Controllers/PersonalTimelineController.cs') diff --git a/Timeline/Controllers/PersonalTimelineController.cs b/Timeline/Controllers/PersonalTimelineController.cs index 11353bb5..842da015 100644 --- a/Timeline/Controllers/PersonalTimelineController.cs +++ b/Timeline/Controllers/PersonalTimelineController.cs @@ -26,9 +26,9 @@ namespace Timeline.Controllers } [HttpGet("users/{username}/timeline")] - public async Task> TimelineGet([FromRoute][Username] string username) + public async Task> TimelineGet([FromRoute][Username] string username) { - return await _service.GetTimeline(username); + return (await _service.GetTimeline(username)).FillLinks(Url); } [HttpGet("users/{username}/timeline/posts")] @@ -77,14 +77,14 @@ namespace Timeline.Controllers [HttpPatch("users/{username}/timeline")] [Authorize] - public async Task> TimelinePatch([FromRoute][Username] string username, [FromBody] TimelinePatchRequest body) + public async Task> TimelinePatch([FromRoute][Username] string username, [FromBody] TimelinePatchRequest body) { if (!this.IsAdministrator() && !(User.Identity.Name == username)) { return StatusCode(StatusCodes.Status403Forbidden, ErrorResponse.Common.Forbid()); } await _service.ChangeProperty(username, body); - var timeline = await _service.GetTimeline(username); + var timeline = (await _service.GetTimeline(username)).FillLinks(Url); return Ok(timeline); } -- cgit v1.2.3