diff options
author | HombreLaser <sebastian-440@live.com> | 2022-10-29 14:48:02 -0500 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2022-10-29 14:48:02 -0500 |
commit | 8f4880d7ad2c793c451dc80dc9a35adb37bb0f3c (patch) | |
tree | 9e1e72aa162181404f31c46eeb4ca2d9e0ce1ed6 /Controllers | |
parent | aa37e431b0ec0c87d8f03c211aa73e1f186f1305 (diff) |
Añadidos filters
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 +} |