diff --git a/api/src/Controllers/ItemsController.cs b/api/src/Controllers/ItemsController.cs index 65cb0ad..792a475 100644 --- a/api/src/Controllers/ItemsController.cs +++ b/api/src/Controllers/ItemsController.cs @@ -15,13 +15,13 @@ public class ItemsController : ControllerBase { service_ = service; } - [[Authorize]] + [Authorize] [HttpGet] public async Task>> getItems() { return Ok(await service_.GetAll()); } - [[Authorize]] + [Authorize] [HttpGet("{id:int}")] public async Task> getItem(int id) { diff --git a/client/src/router/index.ts b/client/src/router/index.ts index 643be40..8591800 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -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