mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-15 08:30:06 +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
|
||||
/// <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()
|
||||
|
||||
Reference in New Issue
Block a user