diff --git a/Webshop.Api/Controllers/Customers/ProfileController.cs b/Webshop.Api/Controllers/Customers/CustomerController.cs similarity index 95% rename from Webshop.Api/Controllers/Customers/ProfileController.cs rename to Webshop.Api/Controllers/Customers/CustomerController.cs index e795be6..6096e92 100644 --- a/Webshop.Api/Controllers/Customers/ProfileController.cs +++ b/Webshop.Api/Controllers/Customers/CustomerController.cs @@ -14,11 +14,11 @@ namespace Webshop.Api.Controllers.Customer [ApiController] [Route("api/v1/customer/[controller]")] // z.B. /api/v1/customer/profile [Authorize(Roles = "Customer")] - public class ProfileController : ControllerBase + public class CustomerController : ControllerBase { private readonly ICustomerService _customerService; - public ProfileController(ICustomerService customerService) + public CustomerController(ICustomerService customerService) { _customerService = customerService; } @@ -52,7 +52,7 @@ namespace Webshop.Api.Controllers.Customer // << NEUER/AKTUALISIERTER ENDPUNKT FÜR PROFIL-AKTUALISIERUNG >> [HttpPost("update-profile")] // /api/v1/customer/profile/update-profile - public async Task UpdateProfile([FromBody] UpdateCustomerProfileDto request) + public async Task UpdateProfile([FromBody] UpdateCustomerDto request) { if (!ModelState.IsValid) return BadRequest(ModelState); diff --git a/Webshop.Application/DTOs/Customers/UpdateCustomerProfileDto.cs b/Webshop.Application/DTOs/Customers/UpdateCustomerDto.cs similarity index 96% rename from Webshop.Application/DTOs/Customers/UpdateCustomerProfileDto.cs rename to Webshop.Application/DTOs/Customers/UpdateCustomerDto.cs index 046d3c0..a051dce 100644 --- a/Webshop.Application/DTOs/Customers/UpdateCustomerProfileDto.cs +++ b/Webshop.Application/DTOs/Customers/UpdateCustomerDto.cs @@ -3,7 +3,7 @@ using System.ComponentModel.DataAnnotations; namespace Webshop.Application.DTOs.Customers { - public class UpdateCustomerProfileDto + public class UpdateCustomerDto { [Required(ErrorMessage = "Vorname ist erforderlich.")] [StringLength(100)] diff --git a/Webshop.Application/Services/Customers/CustomerService.cs b/Webshop.Application/Services/Customers/CustomerService.cs index 53bd6f1..111fd08 100644 --- a/Webshop.Application/Services/Customers/CustomerService.cs +++ b/Webshop.Application/Services/Customers/CustomerService.cs @@ -62,7 +62,7 @@ namespace Webshop.Application.Services.Customers } // << NEUE IMPLEMENTIERUNG: UpdateMyProfileAsync verarbeitet alle Felder >> - public async Task<(bool Success, string ErrorMessage)> UpdateMyProfileAsync(string userId, UpdateCustomerProfileDto profileDto) + public async Task<(bool Success, string ErrorMessage)> UpdateMyProfileAsync(string userId, UpdateCustomerDto profileDto) { var customer = await _customerRepository.GetByUserIdAsync(userId); if (customer == null) return (false, "Kundenprofil nicht gefunden."); diff --git a/Webshop.Application/Services/Customers/Interfaces/ICustomerService.cs b/Webshop.Application/Services/Customers/Interfaces/ICustomerService.cs index 4807362..f8100ee 100644 --- a/Webshop.Application/Services/Customers/Interfaces/ICustomerService.cs +++ b/Webshop.Application/Services/Customers/Interfaces/ICustomerService.cs @@ -10,7 +10,7 @@ namespace Webshop.Application.Services.Customers { Task GetMyProfileAsync(string userId); Task<(bool Success, string ErrorMessage)> ChangePasswordAsync(string userId, ChangePasswordRequestDto request); - Task<(bool Success, string ErrorMessage)> UpdateMyProfileAsync(string userId, UpdateCustomerProfileDto profileDto); + Task<(bool Success, string ErrorMessage)> UpdateMyProfileAsync(string userId, UpdateCustomerDto profileDto); } } \ No newline at end of file