From c00dcc0e8be4f6921c2c8eb67769bcbcf42658cb Mon Sep 17 00:00:00 2001
From: Esteban Ordano
The Copay Team
- -
-
diff --git a/plugins/emailstore.js b/plugins/emailstore.js
index fbddbf2..bf3a534 100644
--- a/plugins/emailstore.js
+++ b/plugins/emailstore.js
@@ -112,6 +112,9 @@ emailPlugin.init = function (config) {
+ globalConfig.apiPrefix
+ '/email/validate'
);
+ emailPlugin.redirectUrl = (
+ config.redirectUrl || 'https://copay.io/in/app?confirmed=true'
+ );
};
/**
@@ -454,7 +457,7 @@ emailPlugin.validate = function (request, response) {
if (err) {
return emailPlugin.returnError({code: 500, message: err}, response);
} else {
- response.json({success: true}).end();
+ response.redirect(emailPlugin.redirectUrl).end();
}
});
}