From 5b5bb69c3ba2150816f120860be46d49c5bc37aa Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 17 Nov 2019 23:04:21 +0800 Subject: Fix typo in path of personal timeline controller actions. Add timeline permission test. --- 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 af6a70f8..88f5ba00 100644 --- a/Timeline/Controllers/PersonalTimelineController.cs +++ b/Timeline/Controllers/PersonalTimelineController.cs @@ -87,7 +87,7 @@ namespace Timeline.Controllers return await _service.GetPosts(username); } - [HttpPost("user/{username}/timeline/postop/create")] + [HttpPost("users/{username}/timeline/postop/create")] [Authorize] [CatchTimelineNotExistException] public async Task> PostOperationCreate([FromRoute][Username] string username, [FromBody] TimelinePostCreateRequest body) @@ -102,7 +102,7 @@ namespace Timeline.Controllers return res; } - [HttpPost("user/{username}/timeline/postop/delete")] + [HttpPost("users/{username}/timeline/postop/delete")] [Authorize] [CatchTimelineNotExistException] public async Task PostOperationDelete([FromRoute][Username] string username, [FromBody] TimelinePostDeleteRequest body) @@ -126,7 +126,7 @@ namespace Timeline.Controllers return Ok(); } - [HttpPost("user/{username}/timeline/op/property")] + [HttpPost("users/{username}/timeline/op/property")] [Authorize] [SelfOrAdmin] [CatchTimelineNotExistException] @@ -136,7 +136,7 @@ namespace Timeline.Controllers return Ok(); } - [HttpPost("user/{username}/timeline/op/member")] + [HttpPost("users/{username}/timeline/op/member")] [Authorize] [SelfOrAdmin] [CatchTimelineNotExistException] -- cgit v1.2.3