From 0ab0a675fbaa4d0ff3f4c83d54ceecf1a1524015 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Mon, 18 Nov 2024 08:13:48 +0100 Subject: [PATCH] Provide the validated email address once validated. --- src/requests/mail.cr | 2 +- src/responses/email.cr | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/requests/mail.cr b/src/requests/mail.cr index 123ba51..eb4aa6a 100644 --- a/src/requests/mail.cr +++ b/src/requests/mail.cr @@ -70,7 +70,7 @@ class AuthD::Request authd.users_per_uid.update cloned_user - Response::NewEmailAddressValidated.new + Response::NewEmailAddressValidated.new cloned_user.contact.email.not_nil! end end AuthD.requests << NewEmailAddressToken diff --git a/src/responses/email.cr b/src/responses/email.cr index 151c541..d0a9527 100644 --- a/src/responses/email.cr +++ b/src/responses/email.cr @@ -6,7 +6,8 @@ class AuthD::Response AuthD.responses << NewEmailTokenSent IPC::JSON.message NewEmailAddressValidated, 15 do - def initialize() + property email : String + def initialize(@email) end end AuthD.responses << NewEmailAddressValidated