mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 02:30:08 +01:00
fix: disable authentication for GET /api/v1/categories
allows unauthenticated users to select a category for random draw
This commit is contained in:
@@ -80,17 +80,18 @@ public class CategoryController : ControllerBase
|
|||||||
|
|
||||||
// GET /api/v1/categories
|
// GET /api/v1/categories
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [AUTHED] Get every category
|
/// Get every category
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Can (and will) return an empty list if no categories are found in DB. <br/>
|
/// Can (and will) return an empty list if no categories are found in DB. <br/><br/>
|
||||||
/// Unlike GET /api/v1/categories/page/..., requires authorization with a JWT.
|
/// <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.
|
/// Has CORS set.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <response code="200">Returned on valid request</response>
|
/// <response code="200">Returned on valid request</response>
|
||||||
// /// <response code="404">Returned when there are no categories to list</response>
|
// /// <response code="404">Returned when there are no categories to list</response>
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
[Authorize]
|
|
||||||
[EnableCors]
|
[EnableCors]
|
||||||
[ProducesResponseType(typeof(List<CategoryShortDTO>), 200)]
|
[ProducesResponseType(typeof(List<CategoryShortDTO>), 200)]
|
||||||
public async Task<IActionResult> GetQuotePage()
|
public async Task<IActionResult> GetQuotePage()
|
||||||
|
|||||||
Reference in New Issue
Block a user