fix: require authorization for items list
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 5s
Some checks failed
Build and Deploy API / build-and-deploy (push) Failing after 5s
This commit is contained in:
@@ -15,13 +15,13 @@ public class ItemsController : ControllerBase {
|
||||
service_ = service;
|
||||
}
|
||||
|
||||
[AllowAnonymous] // accessible if not authorized
|
||||
[[Authorize]]
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<List<Item>>> getItems() {
|
||||
return Ok(await service_.GetAll());
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
[[Authorize]]
|
||||
[HttpGet("{id:int}")]
|
||||
public async Task<ActionResult<Item>> getItem(int id) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user