From a6818eafd6a89865503714c3af2948593f71bab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Tracewicz?= Date: Tue, 1 Oct 2024 17:09:41 +0200 Subject: [PATCH] Closes #60 Addressing PR issues --- backend/src/api/Controllers/TodoController.cs | 2 +- backend/src/api/Filters/UserIdFilter.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/api/Controllers/TodoController.cs b/backend/src/api/Controllers/TodoController.cs index e3a1d53..b047ccb 100644 --- a/backend/src/api/Controllers/TodoController.cs +++ b/backend/src/api/Controllers/TodoController.cs @@ -34,7 +34,7 @@ public IActionResult GetList([FromRoute] int id) return list switch { null => NotFound(), - var user => Ok(list), + var l => Ok(l), }; } diff --git a/backend/src/api/Filters/UserIdFilter.cs b/backend/src/api/Filters/UserIdFilter.cs index d7b8bbb..d7b5506 100644 --- a/backend/src/api/Filters/UserIdFilter.cs +++ b/backend/src/api/Filters/UserIdFilter.cs @@ -3,6 +3,7 @@ namespace api.Filters; +[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)] public class UserIdFilter : Attribute, IAuthorizationFilter { public void OnAuthorization(AuthorizationFilterContext context)