Doichain/meteor-accounts-password-doichain

Update user profile of authenticated dApp with correct template

Open

#1 opened on Jun 13, 2019

 (0 comments) (0 reactions) (0 assignees)JavaScript (0 forks)auto 404
bountyenhancementgood first issuehelp wanted

Repository metrics

Stars
 (0 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

During startup https://github.com/Doichain/meteor-accounts-password-doichain/blob/14d8ad9487e638f9b1325aafa400d6fb494a8148/doichain_server.js#L9

If mailTemplate in settings.json (or settings in db) is not undefined: following REST call should update the DOI request template on the authenticated remote dApp, so the correct email is sent out to the user. ´´´ curl -X PUT -H "Content-Type: application/json" \ -H "X-Auth-Token: vk_3bG4uHN2wyERGhMwL3dJoZPOXpgVv2A6Wgn731bc" -H "X-User-Id: pe3YKzhPqxX94T2AD" \ -d '{"mailTemplate":{"subject":"Welcome to myp project","redirect":"http://myproject.mydomain.com","returnPath":"myproject@mydomain.com","templateURL":"http://server-of-your-email-template/welcome_en.txt"}}'
http://localhost:4010/api/v1/users/ ´´´ following settings variables should be used: mailTemplate.subject mailTemplate.redirect mailTemplate.returnPath mailTemplate.templateUrl

Contributor guide