From 69a5cc2a6f3282de4859d7c083bd67dfa17226fb Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 31 Jan 2020 22:46:17 +0800 Subject: Make all patch return the new entity. --- Timeline/Controllers/PersonalTimelineController.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Timeline/Controllers/PersonalTimelineController.cs') diff --git a/Timeline/Controllers/PersonalTimelineController.cs b/Timeline/Controllers/PersonalTimelineController.cs index 27618c41..11353bb5 100644 --- a/Timeline/Controllers/PersonalTimelineController.cs +++ b/Timeline/Controllers/PersonalTimelineController.cs @@ -77,14 +77,15 @@ 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); - return Ok(); + var timeline = await _service.GetTimeline(username); + return Ok(timeline); } [HttpPut("users/{username}/timeline/members/{member}")] -- cgit v1.2.3