From 0458ec4b61ed3e3acfe3734babfb9592cc252d8d Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Mon, 13 Oct 2025 15:34:29 +0200 Subject: [PATCH] delete AllowAnonymous() in all files --- ApiEfCoreLibrary/Endpoints/Author/CreateAuthorEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Author/DeleteAuthorEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Author/GetAllAuthorsEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Author/GetAuthorEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Author/UpdateAuthorEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Book/CreateBookEndpoint.cs | 3 +-- ApiEfCoreLibrary/Endpoints/Book/DeleteBookEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Book/GetAllBooksEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Book/GetBookEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Book/UpdateBookEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/CreateLoanEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/DeleteLoanEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/GetAllLoansEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/GetLoanEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/PatchLoanEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Loan/UpdateLoanEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Login/DeleteLoginEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Login/GetAllLoginEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Login/GetLoginEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/Login/UpdateLoginEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/User/CreateUserEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/User/DeleteUserEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/User/GetAllUsersEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/User/GetUserEndpoint.cs | 1 - ApiEfCoreLibrary/Endpoints/User/UpdateUserEndpoint.cs | 1 - 25 files changed, 1 insertion(+), 26 deletions(-) diff --git a/ApiEfCoreLibrary/Endpoints/Author/CreateAuthorEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Author/CreateAuthorEndpoint.cs index a7428e5..c166284 100644 --- a/ApiEfCoreLibrary/Endpoints/Author/CreateAuthorEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Author/CreateAuthorEndpoint.cs @@ -9,7 +9,6 @@ public class CreateAuthorEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(DeleteAuthorRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Author/GetAllAuthorsEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Author/GetAllAuthorsEndpoint.cs index 941c819..dc43397 100644 --- a/ApiEfCoreLibrary/Endpoints/Author/GetAllAuthorsEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Author/GetAllAuthorsEndpoint.cs @@ -10,7 +10,6 @@ public class GetAllAuthorsEndpoint(LibraryDbContext database) : EndpointWithoutR public override void Configure() { Get("/api/authors"); - AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Author/GetAuthorEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Author/GetAuthorEndpoint.cs index dc2de68..a8c1fdb 100644 --- a/ApiEfCoreLibrary/Endpoints/Author/GetAuthorEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Author/GetAuthorEndpoint.cs @@ -16,7 +16,6 @@ public class GetAuthorEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(GetAuthorRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Author/UpdateAuthorEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Author/UpdateAuthorEndpoint.cs index 9210906..874a8b1 100644 --- a/ApiEfCoreLibrary/Endpoints/Author/UpdateAuthorEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Author/UpdateAuthorEndpoint.cs @@ -11,7 +11,6 @@ public class UpdateAuthorEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(UpdateAuthorDto req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Book/CreateBookEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Book/CreateBookEndpoint.cs index 01c3597..ba64859 100644 --- a/ApiEfCoreLibrary/Endpoints/Book/CreateBookEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Book/CreateBookEndpoint.cs @@ -9,8 +9,7 @@ public class CreateBookEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(DeleteBookRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Book/GetAllBooksEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Book/GetAllBooksEndpoint.cs index d1ea5f8..5e10502 100644 --- a/ApiEfCoreLibrary/Endpoints/Book/GetAllBooksEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Book/GetAllBooksEndpoint.cs @@ -9,7 +9,6 @@ public class GetAllBooksEndpoint(LibraryDbContext database) : EndpointWithoutReq public override void Configure() { Get("/api/books"); - AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Book/GetBookEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Book/GetBookEndpoint.cs index 8e6495d..72d0ed4 100644 --- a/ApiEfCoreLibrary/Endpoints/Book/GetBookEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Book/GetBookEndpoint.cs @@ -14,7 +14,6 @@ public class GetBookEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(GetBookRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Book/UpdateBookEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Book/UpdateBookEndpoint.cs index 49f1207..ce61468 100644 --- a/ApiEfCoreLibrary/Endpoints/Book/UpdateBookEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Book/UpdateBookEndpoint.cs @@ -10,7 +10,6 @@ public class UpdateBookEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(UpdateBookDto req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Loan/CreateLoanEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Loan/CreateLoanEndpoint.cs index e170484..be6ba28 100644 --- a/ApiEfCoreLibrary/Endpoints/Loan/CreateLoanEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Loan/CreateLoanEndpoint.cs @@ -10,7 +10,6 @@ public class CreateLoanEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(DeleteLoanRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Loan/GetAllLoansEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Loan/GetAllLoansEndpoint.cs index 124ded8..e145d7a 100644 --- a/ApiEfCoreLibrary/Endpoints/Loan/GetAllLoansEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Loan/GetAllLoansEndpoint.cs @@ -9,7 +9,6 @@ public class GetAllLoanEndpoint(LibraryDbContext database) : EndpointWithoutRequ public override void Configure() { Get("/api/loans"); - AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Loan/GetLoanEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Loan/GetLoanEndpoint.cs index c120d16..a05f903 100644 --- a/ApiEfCoreLibrary/Endpoints/Loan/GetLoanEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Loan/GetLoanEndpoint.cs @@ -14,7 +14,6 @@ public class GetLoanEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(GetLoanRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Loan/PatchLoanEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Loan/PatchLoanEndpoint.cs index 1c8bb5d..ed7f30c 100644 --- a/ApiEfCoreLibrary/Endpoints/Loan/PatchLoanEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Loan/PatchLoanEndpoint.cs @@ -10,7 +10,6 @@ public class PatchLoanEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(PatchLoanDto req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Loan/UpdateLoanEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Loan/UpdateLoanEndpoint.cs index 7bd9d75..57f30c2 100644 --- a/ApiEfCoreLibrary/Endpoints/Loan/UpdateLoanEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Loan/UpdateLoanEndpoint.cs @@ -10,7 +10,6 @@ public class UpdateLoanEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(UpdateLoanDto req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Login/DeleteLoginEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Login/DeleteLoginEndpoint.cs index cd80b49..c3389b4 100644 --- a/ApiEfCoreLibrary/Endpoints/Login/DeleteLoginEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Login/DeleteLoginEndpoint.cs @@ -15,7 +15,6 @@ public class DeleteLoginEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(DeleteLoginRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Login/GetAllLoginEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Login/GetAllLoginEndpoint.cs index dd43175..f050fb7 100644 --- a/ApiEfCoreLibrary/Endpoints/Login/GetAllLoginEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Login/GetAllLoginEndpoint.cs @@ -10,7 +10,6 @@ public class GetAllLoginEndpoint(LibraryDbContext database) : EndpointWithoutReq public override void Configure() { Get("/api/logins"); - AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Login/GetLoginEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Login/GetLoginEndpoint.cs index 3e7125f..9ec4d4b 100644 --- a/ApiEfCoreLibrary/Endpoints/Login/GetLoginEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Login/GetLoginEndpoint.cs @@ -14,7 +14,6 @@ public class GetLoginEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(GetLoginRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/Login/UpdateLoginEndpoint.cs b/ApiEfCoreLibrary/Endpoints/Login/UpdateLoginEndpoint.cs index 5322456..ca8a00d 100644 --- a/ApiEfCoreLibrary/Endpoints/Login/UpdateLoginEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/Login/UpdateLoginEndpoint.cs @@ -11,7 +11,6 @@ public class UpdateLoginEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(UpdateLoginDto req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/User/CreateUserEndpoint.cs b/ApiEfCoreLibrary/Endpoints/User/CreateUserEndpoint.cs index 55c0a24..fca4a8a 100644 --- a/ApiEfCoreLibrary/Endpoints/User/CreateUserEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/User/CreateUserEndpoint.cs @@ -9,7 +9,6 @@ public class CreateUserEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(DeleteUserRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/User/GetAllUsersEndpoint.cs b/ApiEfCoreLibrary/Endpoints/User/GetAllUsersEndpoint.cs index 7e4236a..6fe0d38 100644 --- a/ApiEfCoreLibrary/Endpoints/User/GetAllUsersEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/User/GetAllUsersEndpoint.cs @@ -10,7 +10,6 @@ public class GetAllUsersEndpoint(LibraryDbContext database) : EndpointWithoutReq public override void Configure() { Get("/api/users"); - AllowAnonymous(); } public override async Task HandleAsync(CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/User/GetUserEndpoint.cs b/ApiEfCoreLibrary/Endpoints/User/GetUserEndpoint.cs index 98d4bf8..92d6552 100644 --- a/ApiEfCoreLibrary/Endpoints/User/GetUserEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/User/GetUserEndpoint.cs @@ -16,7 +16,6 @@ public class GetUserEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(GetUserRequest req, CancellationToken ct) diff --git a/ApiEfCoreLibrary/Endpoints/User/UpdateUserEndpoint.cs b/ApiEfCoreLibrary/Endpoints/User/UpdateUserEndpoint.cs index 71ed1bc..7ab18ea 100644 --- a/ApiEfCoreLibrary/Endpoints/User/UpdateUserEndpoint.cs +++ b/ApiEfCoreLibrary/Endpoints/User/UpdateUserEndpoint.cs @@ -10,7 +10,6 @@ public class UpdateUserEndpoint(LibraryDbContext database) : Endpoint new {x.Id}); - AllowAnonymous(); } public override async Task HandleAsync(UpdateUserDto req, CancellationToken ct)