summaryrefslogtreecommitdiff
path: root/Controllers/ApiFeedController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Controllers/ApiFeedController.cs')
-rw-r--r--Controllers/ApiFeedController.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/Controllers/ApiFeedController.cs b/Controllers/ApiFeedController.cs
deleted file mode 100644
index 068cc17..0000000
--- a/Controllers/ApiFeedController.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using HyperBooru.ApiModels;
-using HyperBooru.Services;
-using Microsoft.AspNetCore.Authorization;
-using Microsoft.AspNetCore.Mvc;
-using Microsoft.EntityFrameworkCore;
-
-namespace HyperBooru.Controllers;
-
-[ApiController]
-[Authorize]
-[Route("/api/feed")]
-public class ApiFeedController : Controller {
- private IFeedService feedService;
-
- public ApiFeedController(IDbContextFactory<HBContext> dbFactory, IFeedService feedService) =>
- this.feedService = feedService;
-
- [HttpPost]
- public IActionResult FetchChunkAsync([FromBody] FeedRequest feedRequest) {
- if(feedRequest.Count > 1000)
- throw new ApiModels.ArgumentException("Total number of requested items exceeds maximum");
-
- return Ok(feedService.LoadChunk(feedRequest).Select(m => m.Guid).ToArray());
- }
-}