[backend/api] Extract authorize & authenticate attributes to TimelineController
This commit is contained in:
parent
68867aee90
commit
e4b0f32097
1 changed files with 2 additions and 2 deletions
|
@ -16,6 +16,8 @@ using Microsoft.EntityFrameworkCore;
|
||||||
namespace Iceshrimp.Backend.Controllers.Web;
|
namespace Iceshrimp.Backend.Controllers.Web;
|
||||||
|
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
[Authenticate]
|
||||||
|
[Authorize]
|
||||||
[LinkPagination(20, 80)]
|
[LinkPagination(20, 80)]
|
||||||
[EnableRateLimiting("sliding")]
|
[EnableRateLimiting("sliding")]
|
||||||
[Route("/api/iceshrimp/timelines")]
|
[Route("/api/iceshrimp/timelines")]
|
||||||
|
@ -23,8 +25,6 @@ namespace Iceshrimp.Backend.Controllers.Web;
|
||||||
public class TimelineController(DatabaseContext db, NoteRenderer noteRenderer, CacheService cache) : ControllerBase
|
public class TimelineController(DatabaseContext db, NoteRenderer noteRenderer, CacheService cache) : ControllerBase
|
||||||
{
|
{
|
||||||
[HttpGet("home")]
|
[HttpGet("home")]
|
||||||
[Authenticate]
|
|
||||||
[Authorize]
|
|
||||||
[ProducesResults(HttpStatusCode.OK)]
|
[ProducesResults(HttpStatusCode.OK)]
|
||||||
public async Task<IEnumerable<NoteResponse>> GetHomeTimeline(PaginationQuery pq)
|
public async Task<IEnumerable<NoteResponse>> GetHomeTimeline(PaginationQuery pq)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue