dtos neu und aufräumen

This commit is contained in:
Tizian.Breuch
2025-07-31 12:47:37 +02:00
parent 9e6f668752
commit 2e1488d8d5
5 changed files with 57 additions and 38 deletions

View File

@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc;
using Webshop.Application.DTOs.Auth;
using Webshop.Application.DTOs.Email;
using Webshop.Application.Services.Auth;
using Microsoft.AspNetCore.Authorization;
using System.ComponentModel.DataAnnotations;
@@ -14,12 +15,6 @@ namespace Webshop.Api.Controllers.Auth // Beachten Sie den Namespace
private readonly IAuthService _authService;
private readonly ICustomerService _customerService;
public class ResendEmailConfirmationRequestDto
{
[Required]
[EmailAddress]
public string Email { get; set; } = string.Empty;
}
public AuthController(IAuthService authService, ICustomerService customerService)
{

View File

@@ -5,6 +5,7 @@ using System.Security.Claims;
using Webshop.Application.DTOs; // CustomerDto
using Webshop.Application.DTOs.Auth; // ChangePasswordRequestDto
using Webshop.Application.DTOs.Customers; // UpdateCustomerProfileDto
using Webshop.Application.DTOs.Email;
using Webshop.Application.Services;
using System.Threading.Tasks;
using Webshop.Application.Services.Customers;
@@ -12,15 +13,6 @@ using System.ComponentModel.DataAnnotations;
namespace Webshop.Api.Controllers.Customer
{
public class ChangeEmailRequestDto
{
[Required(ErrorMessage = "Neue E-Mail ist erforderlich.")]
[EmailAddress(ErrorMessage = "Ung<6E>ltiges E-Mail-Format.")]
public string NewEmail { get; set; } = string.Empty;
[Required(ErrorMessage = "Aktuelles Passwort ist erforderlich.")]
public string CurrentPassword { get; set; } = string.Empty;
}
[ApiController]
[Route("api/v1/[controller]")] // z.B. /api/v1/customer/profile