mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
formatting
This commit is contained in:
@@ -11,4 +11,5 @@ namespace Features.Auth.Commands.UpdateEmail;
|
||||
/// The authenticated caller's own ID, extracted from the access token -- never bind this from
|
||||
/// client-supplied input.
|
||||
/// </param>
|
||||
public record UpdateEmailCommand(Guid UserAccountId, string NewEmail) : IRequest<UpdateEmailPayload>;
|
||||
public record UpdateEmailCommand(Guid UserAccountId, string NewEmail)
|
||||
: IRequest<UpdateEmailPayload>;
|
||||
|
||||
@@ -31,7 +31,9 @@ public class UpdateEmailHandler(UserManager<ApplicationUser> userManager)
|
||||
{
|
||||
if (result.Errors.Any(e => e.Code == "DuplicateEmail"))
|
||||
throw new ConflictException("Email address already exists");
|
||||
throw new ConflictException(string.Join("; ", result.Errors.Select(e => e.Description)));
|
||||
throw new ConflictException(
|
||||
string.Join("; ", result.Errors.Select(e => e.Description))
|
||||
);
|
||||
}
|
||||
|
||||
return new UpdateEmailPayload(user.Id, user.Email, user.EmailConfirmed);
|
||||
|
||||
Reference in New Issue
Block a user