fix: disable authentication for GET /api/v1/categories

allows unauthenticated users to select a category for random draw
This commit is contained in:
2025-07-28 10:42:09 +02:00
parent b892aeceae
commit 98dc591dce

View File

@@ -80,17 +80,18 @@ public class CategoryController : ControllerBase
// GET /api/v1/categories
/// <summary>
/// [AUTHED] Get every category
/// Get every category
/// </summary>
/// <remarks>
/// Can (and will) return an empty list if no categories are found in DB. <br/>
/// Unlike GET /api/v1/categories/page/..., requires authorization with a JWT.
/// Can (and will) return an empty list if no categories are found in DB. <br/><br/>
/// <s>Unlike GET /api/v1/categories/page/..., requires authorization with a JWT.</s>
/// Not the case anymore, as choosing a quote from a category requires the user to know
/// of existing categories.<br/><br/>
/// Has CORS set.
/// </remarks>
/// <response code="200">Returned on valid request</response>
// /// <response code="404">Returned when there are no categories to list</response>
[HttpGet]
[Authorize]
[EnableCors]
[ProducesResponseType(typeof(List<CategoryShortDTO>), 200)]
public async Task<IActionResult> GetQuotePage()