diff options
Diffstat (limited to 'Controllers')
-rw-r--r-- | Controllers/AuthorsController.cs | 4 | ||||
-rw-r--r-- | Controllers/BooksController.cs | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/Controllers/AuthorsController.cs b/Controllers/AuthorsController.cs index 647a7e5..8d08137 100644 --- a/Controllers/AuthorsController.cs +++ b/Controllers/AuthorsController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using LibraryAPI.Models; +using LibraryAPI.Filters; namespace LibraryAPI.Controllers { + [ServiceFilter(typeof(ActionFilter))] [Route("api/authors")] [ApiController] public class AuthorsController : ControllerBase { @@ -78,4 +80,4 @@ namespace LibraryAPI.Controllers { return Ok(); } } -}
\ No newline at end of file +} diff --git a/Controllers/BooksController.cs b/Controllers/BooksController.cs index d238da7..9b744f8 100644 --- a/Controllers/BooksController.cs +++ b/Controllers/BooksController.cs @@ -1,8 +1,10 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using LibraryAPI.Models; +using LibraryAPI.Filters; namespace LibraryAPI.Controllers { + [ServiceFilter(typeof(ActionFilter))] [Route("api/books")] [ApiController] public class BooksController : ControllerBase { @@ -89,4 +91,4 @@ namespace LibraryAPI.Controllers { return Ok(); } } -}
\ No newline at end of file +} |