modifs mineures

This commit is contained in:
2026-06-02 18:11:55 +02:00
parent cea2c8cf47
commit 7da7c26a2e
2 changed files with 4 additions and 2 deletions
@@ -4,7 +4,7 @@ using PyroFetes.DTO.Contact.Response;
namespace PyroFetes.Endpoints.Contact;
public class GetAllContactxuest(PyroFetesDbContext pyroFetesDbContext) : EndpointWithoutRequest<List<GetContactDto>>
public class GetAllContactEndpoint(PyroFetesDbContext pyroFetesDbContext) : EndpointWithoutRequest<List<GetContactDto>>
{
public override void Configure()
{
@@ -5,7 +5,7 @@ using PyroFetes.DTO.Contact.Response;
namespace PyroFetes.Endpoints.Contact;
public class UpdateContactRequest(PyroFetesDbContext pyroFetesDbContext) : Endpoint <UpdateContactDto, GetContactDto>
public class UpdateContactEndpoint(PyroFetesDbContext pyroFetesDbContext) : Endpoint <UpdateContactDto, GetContactDto>
{
public override void Configure()
{
@@ -29,6 +29,7 @@ public class UpdateContactRequest(PyroFetesDbContext pyroFetesDbContext) : Endpo
databaseContact.PhoneNumber = req.PhoneNumber;
databaseContact.Email = req.Email;
databaseContact.Address = req.Address;
databaseContact.City = req.City;
databaseContact.Role = req.Role;
}
await pyroFetesDbContext.SaveChangesAsync(ct);
@@ -41,6 +42,7 @@ public class UpdateContactRequest(PyroFetesDbContext pyroFetesDbContext) : Endpo
PhoneNumber = req.PhoneNumber,
Email = req.Email,
Address = req.Address,
City = req.City,
Role = req.Role,
};