1
0
Fork 0

Merge pull request #10 from squatconf/www-launch-rc2

v0.4.4-rc2 (latest fixes)
2015
Julian Oates 10 years ago
commit f238d491dc

@ -19,6 +19,9 @@ module.exports = function(db) {
var obj = {} var obj = {}
, email = sanitize(params.query.email) , email = sanitize(params.query.email)
db.get(email, function(err, value) {
if ((err && err.type == 'NotFoundError') || ! value.verified) {
console.log('got email:', params.query) console.log('got email:', params.query)
obj.token = rn() obj.token = rn()
@ -40,7 +43,6 @@ module.exports = function(db) {
from : config.email.from from : config.email.from
, to : email , to : email
, subject: config.email.subject , subject: config.email.subject
//, link : link
, text : config.email.bodyText.replace(/\%link\%/, link) , text : config.email.bodyText.replace(/\%link\%/, link)
} }
@ -55,6 +57,12 @@ module.exports = function(db) {
return res.end() return res.end()
}) })
}) })
} else {
error('already verified: '+ email)
}
}
} else { } else {
error('invalid input: '+ JSON.stringify(params.query)) error('invalid input: '+ JSON.stringify(params.query))
} }

Loading…
Cancel
Save