Feature/Auth: implement user authentication #3

Merged
homeburger merged 48 commits from feature/auth into main 2026-03-22 20:52:22 -05:00
2 changed files with 3 additions and 3 deletions
Showing only changes of commit eb94a1bcb9 - Show all commits

View File

@@ -15,13 +15,13 @@ public class ItemsController : ControllerBase {
service_ = service;
}
[[Authorize]]
[Authorize]
[HttpGet]
public async Task<ActionResult<List<Item>>> getItems() {
return Ok(await service_.GetAll());
}
[[Authorize]]
[Authorize]
[HttpGet("{id:int}")]
public async Task<ActionResult<Item>> getItem(int id) {

View File

@@ -13,7 +13,7 @@ const routes = [
{ path: "/", component: index },
{ path: "/login", component: LoginForm },
{ path: "/register", component: RegisterForm },
{ path: "/items", component: ItemsList },
{ path: "/items", component: ItemsList, meta: { requiresAuth: true } },
{ path: "/item/new", component: ItemForm, meta: { requiresAuth: true } },
{ path: "/item/:id", component: ItemForm, meta: { requiresAuth: true } }
]; // I really like this