Fix NPE in POST /users/:id/registerEmail

This commit is contained in:
Colin McDonald 2016-07-23 19:58:43 -04:00
parent 303634dedc
commit 2ba32f752d
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public final class POSTUsersIdRegisterEmail implements Handler<RoutingContext> {
NotificationTemplate template = SyncUtils.runBlocking(v -> NotificationTemplate.findById("email-confirmation", v)); NotificationTemplate template = SyncUtils.runBlocking(v -> NotificationTemplate.findById("email-confirmation", v));
Notification notification = new Notification(template, replacements, replacements); Notification notification = new Notification(template, replacements, replacements);
notification.sendAsEmail(user.getEmail(), (ignored, error) -> { notification.sendAsEmail(user.getPendingEmail(), (ignored, error) -> {
if (error != null) { if (error != null) {
ErrorUtils.respondInternalError(ctx, error); ErrorUtils.respondInternalError(ctx, error);
} else { } else {