diff options
| author | Jake Mannens <jake@asger.xyz> | 2026-05-22 12:46:00 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2026-05-23 22:13:00 +1000 |
| commit | 4ea3ddb38d010c2f85c22b7f1c3f2d7e0c1355e3 (patch) | |
| tree | 90af9203059d645eb77216f1a091722ee9702438 /Controllers/ApiFeedController.cs | |
| parent | 6de5d7f5364fe1d54703da6d6b7cb08ea26e939f (diff) | |
Initial commitwasm-oldserver
Diffstat (limited to 'Controllers/ApiFeedController.cs')
| -rw-r--r-- | Controllers/ApiFeedController.cs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Controllers/ApiFeedController.cs b/Controllers/ApiFeedController.cs deleted file mode 100644 index 382169e..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) - return BadRequest("Total number of requested items exceeds maximum"); - - return Ok(feedService.LoadChunk(feedRequest).Select(m => m.Guid).ToArray()); - } -} |
