Doichain/meteor-accounts-password-doichain

Update user profile of authenticated dApp with correct template

Aperta

#1 aperta il 13 giu 2019

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (0 fork)auto 404
bountyenhancementgood first issuehelp wanted

Metriche repository

Star
 (0 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor