Add invitation email template.
[?]
Jul 4, 2015, 12:48 AM
M3KUPGZK2UTW4FG3Q632K7P7MI4FVWD5TTIP45UTI3E72UKOWJBACDependencies
- [2]
2XQD6KKKAdd invitation logic and clean up DBProg error handling. - [3]
V2VDN77HEnable postgres configuration via environment variable for Heroku. - [4]
4ZLEDBK7Initial attempts at dockerizing, cabal isn't cooperating. - [5]
O5FVTOM6Undo JSON silliness, enable a couple more routes. - [6]
JEOPOOPTDockerfile now builds correctly. - [*]
QO4NFWIYAdded sample config file. - [*]
PGZJ736CUpdate aftok.cfg.example and revise INSTALL instructions - [*]
PBD7LZYQPostgres & auth are beginning to function. - [*]
EQXRXRZDChanged to use tasty instead of test-framework
Change contents
- replacement in Dockerfile at line 26
# Install the aftok dependencies# Install and build aftok-server dependencies - edit in Dockerfile at line 28
WORKDIR /opt/aftok - replacement in Dockerfile at line 30
RUN cd /opt/aftok && cabal install cpphs && cabal install --only-dependencies -j4RUN cabal install cpphsRUN cabal install --only-dependencies -j4 - replacement in Dockerfile at line 34
ADD ./lib /opt/aftok/libADD ./server /opt/aftok/serverRUN cd /opt/aftok && cabal configure && cabal build aftok-serverADD ./lib /opt/aftok/libADD ./server /opt/aftok/serverRUN cabal configure && cabal build aftok-server - edit in conf/aftok.cfg.example at line 24[9.1076]
sendgridUser = "example"sendgridKey = "abcdefg"# templatePath = "/opt/aftok/server/templates" - replacement in server/Aftok/QConfig.hs at line 41
<*> C.require cfg "templatePath"<*> C.lookupDefault "templatePath" cfg "/opt/aftok/server/templates" - replacement in server/Aftok/Snaplet/Projects.hs at line 77
let setAttrs = setAttribute "invCode" (renderInvCode invCode)let setAttrs = setAttribute "from_email" (from' ^. _Email) .setAttribute "project_name" pn .setAttribute "to_email" (to' ^. _Email) .setAttribute "inv_code" (renderInvCode invCode) - replacement in server/Aftok/Snaplet/Projects.hs at line 82
{ from = unpack $ from' ^. _Email{ from = "invitations@aftok.com" - file addition: templates[11.1243]
- file addition: invitation_email.st[0.719]
Hi there!A friend of yours ($from_email$") has invited you to join the "$project_name$" project at http://aftok.com. Here's what you need to do to accept their invitation. At present, there's no user interface for the service other than bare HTTP requests with a JSON payload. A script has been provided below that you can edit to include your own information. You'll need to replace the following three tokens:USER -- a username of your choosingPASS -- the password you want to use for accessing the siteBTC_ADDR -- the bitcoin address that you want payouts to be initially sent to. You'll be able to change this later, but because changes of payout addresses are validated by checking transactions on the blockchain, it's important that this be a usable address that you control.Substitute your own values for the tokens in the script below, then run it! Also, if you'd prefer that a different email address be associated with your account, change that as well.curl -k -v -H 'Content-Type: application/json' -d '{"username":"USER", "password":"PASS", "email":"$to_email$", "btcAddr":"BTC_ADDR", "invitation_codes":["$inv_code$"]}' 'https://aftok.com/register'