mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-12-18 03:23:42 -05:00
19 lines
633 B
CoffeeScript
19 lines
633 B
CoffeeScript
|
sendwithus = require '../sendwithus'
|
||
|
utils = require '../lib/utils'
|
||
|
errors = require '../commons/errors'
|
||
|
wrap = require 'co-express'
|
||
|
database = require '../commons/database'
|
||
|
parse = require '../commons/parse'
|
||
|
|
||
|
module.exports =
|
||
|
sendParentSignupInstructions: wrap (req, res, next) ->
|
||
|
context =
|
||
|
email_id: sendwithus.templates.coppa_deny_parent_signup
|
||
|
recipient:
|
||
|
address: req.body.parentEmail
|
||
|
sendwithus.api.send context, (err, result) ->
|
||
|
if err
|
||
|
return next(new errors.InternalServerError("Error sending email. Check that it's valid and try again."))
|
||
|
else
|
||
|
res.status(200).send()
|