Modifs communication
This commit is contained in:
@@ -19,16 +19,22 @@ public class CreateCommunicationEndpoint(PyroFetesDbContext pyroFetesDbContext)
|
||||
{
|
||||
Calling = req.Calling,
|
||||
Email = req.Email,
|
||||
Meeting = req.Meeting
|
||||
Meeting = req.Meeting,
|
||||
ContactId = req.ContactId
|
||||
};
|
||||
pyroFetesDbContext.Add(communication);
|
||||
await pyroFetesDbContext.SaveChangesAsync(ct);
|
||||
|
||||
GetCommunicationDto response = new()
|
||||
{
|
||||
Calling = req.Calling,
|
||||
Email = req.Email,
|
||||
Meeting = req.Meeting
|
||||
Calling = communication.Calling,
|
||||
Email = communication.Email,
|
||||
Meeting = communication.Meeting,
|
||||
ContactId = communication.ContactId,
|
||||
ContactFirstName = communication.Contact?.FirstName,
|
||||
ContactLastName = communication.Contact?.LastName,
|
||||
ContactEmail = communication.Contact?.Email,
|
||||
ContactPhoneNumber = communication.Contact?.PhoneNumber,
|
||||
};
|
||||
|
||||
await Send.OkAsync(response, ct);
|
||||
|
||||
Reference in New Issue
Block a user