delete AllowAnonymous() in all files

This commit is contained in:
2025-10-13 15:34:29 +02:00
parent 41f8a58eec
commit 0458ec4b61
25 changed files with 1 additions and 26 deletions

View File

@@ -9,7 +9,6 @@ public class CreateAuthorEndpoint(LibraryDbContext database) : Endpoint<CreateAu
public override void Configure() public override void Configure()
{ {
Post("/api/authors"); Post("/api/authors");
AllowAnonymous();
} }
public override async Task HandleAsync(CreateAuthorDto req, CancellationToken ct) public override async Task HandleAsync(CreateAuthorDto req, CancellationToken ct)

View File

@@ -15,7 +15,6 @@ public class DeleteAuthorEndpoint(LibraryDbContext database) : Endpoint<DeleteAu
public override void Configure() public override void Configure()
{ {
Delete("/api/authors/{@Id}", x => new {x.Id}); Delete("/api/authors/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(DeleteAuthorRequest req, CancellationToken ct) public override async Task HandleAsync(DeleteAuthorRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class GetAllAuthorsEndpoint(LibraryDbContext database) : EndpointWithoutR
public override void Configure() public override void Configure()
{ {
Get("/api/authors"); Get("/api/authors");
AllowAnonymous();
} }
public override async Task HandleAsync(CancellationToken ct) public override async Task HandleAsync(CancellationToken ct)

View File

@@ -16,7 +16,6 @@ public class GetAuthorEndpoint(LibraryDbContext database) : Endpoint<GetAuthorRe
public override void Configure() public override void Configure()
{ {
Get("/api/authors/{@Id}", x => new {x.Id}); Get("/api/authors/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(GetAuthorRequest req, CancellationToken ct) public override async Task HandleAsync(GetAuthorRequest req, CancellationToken ct)

View File

@@ -11,7 +11,6 @@ public class UpdateAuthorEndpoint(LibraryDbContext database) : Endpoint<UpdateAu
public override void Configure() public override void Configure()
{ {
Put("/api/authors/{@Id}", x => new {x.Id}); Put("/api/authors/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(UpdateAuthorDto req, CancellationToken ct) public override async Task HandleAsync(UpdateAuthorDto req, CancellationToken ct)

View File

@@ -9,8 +9,7 @@ public class CreateBookEndpoint(LibraryDbContext database) : Endpoint<CreateBook
{ {
public override void Configure() public override void Configure()
{ {
Post("/api/books"); Post("/api/books"); AllowAnonymous();
AllowAnonymous();
} }
public override async Task HandleAsync(CreateBookDto req, CancellationToken ct) public override async Task HandleAsync(CreateBookDto req, CancellationToken ct)

View File

@@ -16,7 +16,6 @@ public class DeleteBookEndpoint(LibraryDbContext database) : Endpoint<DeleteBook
public override void Configure() public override void Configure()
{ {
Delete("/api/books/{@Id}", x => new {x.Id}); Delete("/api/books/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(DeleteBookRequest req, CancellationToken ct) public override async Task HandleAsync(DeleteBookRequest req, CancellationToken ct)

View File

@@ -9,7 +9,6 @@ public class GetAllBooksEndpoint(LibraryDbContext database) : EndpointWithoutReq
public override void Configure() public override void Configure()
{ {
Get("/api/books"); Get("/api/books");
AllowAnonymous();
} }
public override async Task HandleAsync(CancellationToken ct) public override async Task HandleAsync(CancellationToken ct)

View File

@@ -14,7 +14,6 @@ public class GetBookEndpoint(LibraryDbContext database) : Endpoint<GetBookReques
public override void Configure() public override void Configure()
{ {
Get("/api/books/{@Id}", x => new {x.Id}); Get("/api/books/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(GetBookRequest req, CancellationToken ct) public override async Task HandleAsync(GetBookRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class UpdateBookEndpoint(LibraryDbContext database) : Endpoint<UpdateBook
public override void Configure() public override void Configure()
{ {
Put("/api/books/{@Id}", x => new {x.Id}); Put("/api/books/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(UpdateBookDto req, CancellationToken ct) public override async Task HandleAsync(UpdateBookDto req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class CreateLoanEndpoint(LibraryDbContext database) : Endpoint<CreateLoan
public override void Configure() public override void Configure()
{ {
Post("/api/loans"); Post("/api/loans");
AllowAnonymous();
} }
public override async Task HandleAsync(CreateLoanDto req, CancellationToken ct) public override async Task HandleAsync(CreateLoanDto req, CancellationToken ct)

View File

@@ -16,7 +16,6 @@ public class DeleteLoanEndpoint(LibraryDbContext database) : Endpoint<DeleteLoan
public override void Configure() public override void Configure()
{ {
Delete("/api/loans/{@Id}", x => new {x.Id}); Delete("/api/loans/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(DeleteLoanRequest req, CancellationToken ct) public override async Task HandleAsync(DeleteLoanRequest req, CancellationToken ct)

View File

@@ -9,7 +9,6 @@ public class GetAllLoanEndpoint(LibraryDbContext database) : EndpointWithoutRequ
public override void Configure() public override void Configure()
{ {
Get("/api/loans"); Get("/api/loans");
AllowAnonymous();
} }
public override async Task HandleAsync(CancellationToken ct) public override async Task HandleAsync(CancellationToken ct)

View File

@@ -14,7 +14,6 @@ public class GetLoanEndpoint(LibraryDbContext database) : Endpoint<GetLoanReques
public override void Configure() public override void Configure()
{ {
Get("/api/loans/{@Id}", x => new {x.Id}); Get("/api/loans/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(GetLoanRequest req, CancellationToken ct) public override async Task HandleAsync(GetLoanRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class PatchLoanEndpoint(LibraryDbContext database) : Endpoint<PatchLoanDt
public override void Configure() public override void Configure()
{ {
Patch("/api/loans/{@Id}/EffectiveReturningDate", x => new {x.Id}); Patch("/api/loans/{@Id}/EffectiveReturningDate", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(PatchLoanDto req, CancellationToken ct) public override async Task HandleAsync(PatchLoanDto req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class UpdateLoanEndpoint(LibraryDbContext database) : Endpoint<UpdateLoan
public override void Configure() public override void Configure()
{ {
Put("/api/loans/{@Id}", x => new {x.Id}); Put("/api/loans/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(UpdateLoanDto req, CancellationToken ct) public override async Task HandleAsync(UpdateLoanDto req, CancellationToken ct)

View File

@@ -15,7 +15,6 @@ public class DeleteLoginEndpoint(LibraryDbContext database) : Endpoint<DeleteLog
public override void Configure() public override void Configure()
{ {
Delete("/api/logins/{@Id}", x => new {x.Id}); Delete("/api/logins/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(DeleteLoginRequest req, CancellationToken ct) public override async Task HandleAsync(DeleteLoginRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class GetAllLoginEndpoint(LibraryDbContext database) : EndpointWithoutReq
public override void Configure() public override void Configure()
{ {
Get("/api/logins"); Get("/api/logins");
AllowAnonymous();
} }
public override async Task HandleAsync(CancellationToken ct) public override async Task HandleAsync(CancellationToken ct)

View File

@@ -14,7 +14,6 @@ public class GetLoginEndpoint(LibraryDbContext database) : Endpoint<GetLoginRequ
public override void Configure() public override void Configure()
{ {
Get("/api/logins/{@Id}", x => new {x.Id}); Get("/api/logins/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(GetLoginRequest req, CancellationToken ct) public override async Task HandleAsync(GetLoginRequest req, CancellationToken ct)

View File

@@ -11,7 +11,6 @@ public class UpdateLoginEndpoint(LibraryDbContext database) : Endpoint<UpdateLog
public override void Configure() public override void Configure()
{ {
Put("/api/logins/{@Id}", x => new {x.Id}); Put("/api/logins/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(UpdateLoginDto req, CancellationToken ct) public override async Task HandleAsync(UpdateLoginDto req, CancellationToken ct)

View File

@@ -9,7 +9,6 @@ public class CreateUserEndpoint(LibraryDbContext database) : Endpoint<CreateUser
public override void Configure() public override void Configure()
{ {
Post("/api/users"); Post("/api/users");
AllowAnonymous();
} }
public override async Task HandleAsync(CreateUserDto req, CancellationToken ct) public override async Task HandleAsync(CreateUserDto req, CancellationToken ct)

View File

@@ -15,7 +15,6 @@ public class DeleteUserEndpoint(LibraryDbContext database) : Endpoint<DeleteUser
public override void Configure() public override void Configure()
{ {
Delete("/api/users/{@Id}", x => new {x.Id}); Delete("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(DeleteUserRequest req, CancellationToken ct) public override async Task HandleAsync(DeleteUserRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class GetAllUsersEndpoint(LibraryDbContext database) : EndpointWithoutReq
public override void Configure() public override void Configure()
{ {
Get("/api/users"); Get("/api/users");
AllowAnonymous();
} }
public override async Task HandleAsync(CancellationToken ct) public override async Task HandleAsync(CancellationToken ct)

View File

@@ -16,7 +16,6 @@ public class GetUserEndpoint(LibraryDbContext database) : Endpoint<GetUserReques
public override void Configure() public override void Configure()
{ {
Get("/api/users/{@Id}", x => new {x.Id}); Get("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(GetUserRequest req, CancellationToken ct) public override async Task HandleAsync(GetUserRequest req, CancellationToken ct)

View File

@@ -10,7 +10,6 @@ public class UpdateUserEndpoint(LibraryDbContext database) : Endpoint<UpdateUser
public override void Configure() public override void Configure()
{ {
Put("/api/users/{@Id}", x => new {x.Id}); Put("/api/users/{@Id}", x => new {x.Id});
AllowAnonymous();
} }
public override async Task HandleAsync(UpdateUserDto req, CancellationToken ct) public override async Task HandleAsync(UpdateUserDto req, CancellationToken ct)