formatting

This commit is contained in:
Aaron Po
2026-08-24 01:08:55 -04:00
parent c825d99b0a
commit b64c42ebde
27 changed files with 166 additions and 136 deletions

View File

@@ -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>;

View File

@@ -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);