Fix email templates path, signup message.
This commit is contained in:
parent
0d762bb416
commit
84e5925135
2 changed files with 8 additions and 3 deletions
|
@ -2,7 +2,7 @@ import crypto from 'crypto';
|
||||||
import passwords from 'passwords';
|
import passwords from 'passwords';
|
||||||
import uuid from 'node-uuid';
|
import uuid from 'node-uuid';
|
||||||
import views from 'co-views';
|
import views from 'co-views';
|
||||||
const render = views('views', { default: 'ejs'});
|
const render = views(__dirname + '/../views', { default: 'ejs'});
|
||||||
import debugname from 'debug';
|
import debugname from 'debug';
|
||||||
const debug = debugname('hostr-web:auth');
|
const debug = debugname('hostr-web:auth');
|
||||||
import { Mandrill } from 'mandrill-api/mandrill';
|
import { Mandrill } from 'mandrill-api/mandrill';
|
||||||
|
@ -131,9 +131,9 @@ export function* sendResetToken(ctx, email) {
|
||||||
'token': token,
|
'token': token,
|
||||||
'created': Math.round(new Date().getTime() / 1000)
|
'created': Math.round(new Date().getTime() / 1000)
|
||||||
});
|
});
|
||||||
const html = yield this.render('email/inlined/forgot', {forgotUrl: this.locals.baseUrl + '/forgot/' + token});
|
const html = yield render('email/inlined/forgot', {forgotUrl: process.env.BASE_URL + '/forgot/' + token});
|
||||||
const text = `It seems you've forgotten your password :(
|
const text = `It seems you've forgotten your password :(
|
||||||
Visit ${ctx.locals.baseUrl + '/forgot/' + token} to set a new one.
|
Visit ${process.env.BASE_URL + '/forgot/' + token} to set a new one.
|
||||||
`;
|
`;
|
||||||
mandrill.messages.send({message: {
|
mandrill.messages.send({message: {
|
||||||
html: html,
|
html: html,
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
|
|
||||||
<section class="container user-form clearfix">
|
<section class="container user-form clearfix">
|
||||||
<p class="lead">Sign up to Hostr.</p>
|
<p class="lead">Sign up to Hostr.</p>
|
||||||
|
<% if(typeof message !== 'undefined') { %>
|
||||||
|
<div class="alert alert-success alert-signin">
|
||||||
|
<%= message %>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
<div class="holder">
|
<div class="holder">
|
||||||
<form role="form" action="/signup" method="post">
|
<form role="form" action="/signup" method="post">
|
||||||
<% if(typeof error !== 'undefined') { %>
|
<% if(typeof error !== 'undefined') { %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue