aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Controllers/PersonalTimelineController.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2019-11-09 23:44:20 +0800
committer杨宇千 <crupest@outlook.com>2019-11-09 23:44:20 +0800
commitea8d82143c07afb38767d6afb4be0031452495fb (patch)
tree459d6c9131122c87a870ad18ff2ac297481beb46 /Timeline/Controllers/PersonalTimelineController.cs
parent976d6158e67e79e9d6d7e140f5749aa6630d0fb6 (diff)
downloadtimeline-ea8d82143c07afb38767d6afb4be0031452495fb.tar.gz
timeline-ea8d82143c07afb38767d6afb4be0031452495fb.tar.bz2
timeline-ea8d82143c07afb38767d6afb4be0031452495fb.zip
Add PersonalTimelineController PostOperationCreate unit tests.
Diffstat (limited to 'Timeline/Controllers/PersonalTimelineController.cs')
-rw-r--r--Timeline/Controllers/PersonalTimelineController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Timeline/Controllers/PersonalTimelineController.cs b/Timeline/Controllers/PersonalTimelineController.cs
index f006ad47..f41e354b 100644
--- a/Timeline/Controllers/PersonalTimelineController.cs
+++ b/Timeline/Controllers/PersonalTimelineController.cs
@@ -74,7 +74,7 @@ namespace Timeline.Controllers
[HttpGet("users/{username}/timeline/posts")]
[CatchTimelineNotExistException]
- public async Task<ActionResult<IList<TimelinePostInfo>>> PostsGet([FromRoute][Username] string username)
+ public async Task<ActionResult<IList<TimelinePostInfo>>> PostListGet([FromRoute][Username] string username)
{
if (!IsAdmin() && !await _service.HasReadPermission(username, GetAuthUsername()))
{
@@ -88,7 +88,7 @@ namespace Timeline.Controllers
[HttpPost("user/{username}/timeline/postop/create")]
[Authorize]
[CatchTimelineNotExistException]
- public async Task<ActionResult<TimelinePostCreateResponse>> TimelinePost([FromRoute][Username] string username, [FromBody] TimelinePostCreateRequest body)
+ public async Task<ActionResult<TimelinePostCreateResponse>> PostOperationCreate([FromRoute][Username] string username, [FromBody] TimelinePostCreateRequest body)
{
if (!IsAdmin() && !await _service.IsMemberOf(username, GetAuthUsername()!))
{
@@ -103,7 +103,7 @@ namespace Timeline.Controllers
[HttpPost("user/{username}/timeline/postop/delete")]
[Authorize]
[CatchTimelineNotExistException]
- public async Task<ActionResult> TimelinePostDelete([FromRoute][Username] string username, [FromBody] TimelinePostDeleteRequest body)
+ public async Task<ActionResult> PostOperationDelete([FromRoute][Username] string username, [FromBody] TimelinePostDeleteRequest body)
{
var postId = body.Id!.Value;
if (!IsAdmin() && !await _service.HasPostModifyPermission(username, postId, GetAuthUsername()!))