From 53888df71f7580bf169dfab3d13d313cf96d26df Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 21 Aug 2020 21:25:33 +0800 Subject: ... --- Timeline/Controllers/TimelineController.cs | 48 ++++++------------------------ 1 file changed, 9 insertions(+), 39 deletions(-) (limited to 'Timeline/Controllers/TimelineController.cs') diff --git a/Timeline/Controllers/TimelineController.cs b/Timeline/Controllers/TimelineController.cs index b376bce5..43178ac6 100644 --- a/Timeline/Controllers/TimelineController.cs +++ b/Timeline/Controllers/TimelineController.cs @@ -49,8 +49,7 @@ namespace Timeline.Controllers /// A username. If set, only timelines related to the user will return. /// Specify the relation type, may be 'own' or 'join'. If not set, both type will return. /// "Private" or "Register" or "Public". If set, only timelines whose visibility is specified one will return. - /// Succeeded to get timelines. - /// Model is invalid. Or user specified by "relate" param does not exist. + /// The timeline list. [HttpGet("timelines")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status400BadRequest)] @@ -117,9 +116,7 @@ namespace Timeline.Controllers /// A unique id. If specified and if-modified-since is also specified, the timeline info will return when unique id is not the specified one even if it is not modified. /// Same effect as If-Modified-Since header and take precedence than it. /// If specified, will return 304 if not modified. - /// Succeeded to get timeline info. - /// Timeline not change. - /// Timeline does not exist. + /// The timeline info. [HttpGet("timelines/{name}")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status304NotModified)] @@ -171,14 +168,12 @@ namespace Timeline.Controllers } /// - /// Get posts of a timeline. You need to have permission. + /// Get posts of a timeline. /// /// The name of the timeline. /// If set, only posts modified since the time will return. /// If set to true, deleted post will also return. - /// Succeeded to get posts. - /// You have no permission. - /// The timeline does not exist. + /// The post list. [HttpGet("timelines/{name}/posts")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(StatusCodes.Status403Forbidden)] @@ -197,16 +192,12 @@ namespace Timeline.Controllers } /// - /// Get the data of a post. Usually a image post. You need to have permission. + /// Get the data of a post. Usually a image post. /// /// Timeline name. /// The id of the post. /// If-None-Match header. - /// Succeeded to get data. - /// Data not changed. - /// Error code is 11040502 if post has no data. - /// You have no permission. - /// Timeline or post does not exist. + /// The data. [HttpGet("timelines/{name}/posts/{id}/data")] [ProducesResponseType(StatusCodes.Status200OK)] [ProducesResponseType(typeof(void), StatusCodes.Status304NotModified)] @@ -240,15 +231,11 @@ namespace Timeline.Controllers } /// - /// Create a new post. You need to have permission. + /// Create a new post. /// /// Timeline name. /// /// Info of new post. - /// Succeeded to create post and return info of new post. - /// Body model is invalid. - /// You have not logged in. - /// You have no permission. [HttpPost("timelines/{name}/posts")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -316,9 +303,7 @@ namespace Timeline.Controllers /// /// Timeline name. /// Post id. - /// Succeeded to delete post. Or post does not exist. - /// You have not logged in. - /// You have no permission. + /// Info of deletion. [HttpDelete("timelines/{name}/posts/{id}")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -347,9 +332,6 @@ namespace Timeline.Controllers /// Timeline name. /// /// The new info. - /// Succeeded to change properties of timeline. Return the new info. - /// You have not logged in. - /// You have no permission. [HttpPatch("timelines/{name}")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -372,10 +354,6 @@ namespace Timeline.Controllers /// /// Timeline name. /// The new member's username. - /// Succeeded. - /// User does not exist. - /// You have not logged in. - /// You have no permission. [HttpPut("timelines/{name}/members/{member}")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -405,9 +383,6 @@ namespace Timeline.Controllers /// /// Timeline name. /// The member's username. - /// Succeeded. Or the user is not a member. - /// You have not logged in. - /// You have no permission. [HttpDelete("timelines/{name}/members/{member}")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -436,9 +411,6 @@ namespace Timeline.Controllers /// /// /// Info of new timeline. - /// Succeeded and return info of new timeline. - /// Timeline name is conflict. - /// You have not logged in. [HttpPost("timelines")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] @@ -464,9 +436,7 @@ namespace Timeline.Controllers /// Delete a timeline. /// /// Timeline name. - /// Succeeded. Or timeline does not exist. - /// You have not logged in. - /// You have no permission. + /// Info of deletion. [HttpDelete("timelines/{name}")] [Authorize] [ProducesResponseType(StatusCodes.Status200OK)] -- cgit v1.2.3