aloux-iam 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controllers/user.js +4 -5
- package/package.json +1 -1
package/lib/controllers/user.js
CHANGED
|
@@ -637,12 +637,11 @@ self.sendverifyToken = async (correo, token) => {
|
|
|
637
637
|
|
|
638
638
|
let user = await User.findOne({ email: correo }, { name: 1, email: 1 })
|
|
639
639
|
|
|
640
|
-
let
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
640
|
+
let template = fs.readFileSync(process.env.TEMPLATE_VERIFY_EMAIL, "utf8")
|
|
641
|
+
template = template.replaceAll('{{name}}', user.name)
|
|
642
|
+
template = template.replaceAll('{{urlVerifyEmail}}', process.env.URL_VERIFY_EMAIL + '/?token='+ token)
|
|
644
643
|
|
|
645
|
-
return await alouxAWS.sendCustom(user.email,
|
|
644
|
+
return await alouxAWS.sendCustom(user.email, template, "Verifica tu cuenta de " + process.env.PROJECT_NAME)
|
|
646
645
|
} catch (error) {
|
|
647
646
|
throw new Error('Ocurrio un error al envìar el correo electronico')
|
|
648
647
|
}
|