adress
This commit is contained in:
@@ -26,7 +26,6 @@ namespace Webshop.Application.Services.Customers
|
||||
var customer = await _customerRepository.GetByUserIdAsync(userId);
|
||||
if (customer == null)
|
||||
{
|
||||
// If the customer profile doesn't exist for a valid user, return an empty list.
|
||||
return ServiceResult.Ok<IEnumerable<AddressDto>>(new List<AddressDto>());
|
||||
}
|
||||
|
||||
@@ -67,8 +66,9 @@ namespace Webshop.Application.Services.Customers
|
||||
var newAddress = new Address
|
||||
{
|
||||
CustomerId = customer.Id,
|
||||
FirstName = addressDto.FirstName ?? customer.FirstName,
|
||||
LastName = addressDto.LastName ?? customer.LastName,
|
||||
// << KORREKTUR: Namen vom Kundenprofil übernehmen, da sie im DTO nicht vorhanden sind. >>
|
||||
FirstName = customer.FirstName,
|
||||
LastName = customer.LastName,
|
||||
Street = addressDto.Street,
|
||||
HouseNumber = addressDto.HouseNumber,
|
||||
City = addressDto.City,
|
||||
|
||||
Reference in New Issue
Block a user