aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Controllers
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-09 19:30:39 +0800
committercrupest <crupest@outlook.com>2022-04-09 19:30:39 +0800
commit86160e4a5697615452a7e06dc78f8be4c8b2515f (patch)
treec679b7750a1b341af991a82023edd00038b5d152 /BackEnd/Timeline/Controllers
parent0aa43ef4c6724f672453676a0c688cd80097dad7 (diff)
downloadtimeline-86160e4a5697615452a7e06dc78f8be4c8b2515f.tar.gz
timeline-86160e4a5697615452a7e06dc78f8be4c8b2515f.tar.bz2
timeline-86160e4a5697615452a7e06dc78f8be4c8b2515f.zip
...
Diffstat (limited to 'BackEnd/Timeline/Controllers')
-rw-r--r--BackEnd/Timeline/Controllers/TimelinePostV2Controller.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Controllers/TimelinePostV2Controller.cs b/BackEnd/Timeline/Controllers/TimelinePostV2Controller.cs
index 3a694e31..6e4b265f 100644
--- a/BackEnd/Timeline/Controllers/TimelinePostV2Controller.cs
+++ b/BackEnd/Timeline/Controllers/TimelinePostV2Controller.cs
@@ -80,6 +80,7 @@ namespace Timeline.Controllers
[ProducesResponseType(typeof(void), StatusCodes.Status304NotModified)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
+ [ProducesResponseType(StatusCodes.Status410Gone)]
[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
public async Task<ActionResult<ByteData>> DataIndexGetAsync([FromRoute][Username] string owner, [FromRoute][TimelineName] string timeline, [FromRoute] long post)
{
@@ -92,6 +93,7 @@ namespace Timeline.Controllers
[ProducesResponseType(typeof(void), StatusCodes.Status304NotModified)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
+ [ProducesResponseType(StatusCodes.Status410Gone)]
[ProducesResponseType(StatusCodes.Status422UnprocessableEntity)]
public async Task<ActionResult> DataGetAsync([FromRoute][Username] string owner, [FromRoute][TimelineName] string timeline, [FromRoute] long post, [FromRoute(Name = "data_index")][Range(0, 100)] long dataIndex)
{
@@ -103,10 +105,10 @@ namespace Timeline.Controllers
}
return await DataCacheHelper.GenerateActionResult(this,
- () => _postService.GetPostDataDigestAsync(timelineId, post, dataIndex),
+ () => _postService.GetPostDataDigestV2Async(timelineId, post, dataIndex),
async () =>
{
- var data = await _postService.GetPostDataAsync(timelineId, post, dataIndex);
+ var data = await _postService.GetPostDataV2Async(timelineId, post, dataIndex);
if (data.ContentType == MimeTypes.TextMarkdown)
{
return new ByteData(_markdownProcessor.Process(data.Data, Url, timeline, post), data.ContentType);