mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-05-01 16:33:38 -04:00
Add non-URL join code to classroom invite emails
This commit is contained in:
parent
a208a514d2
commit
b2cfaf3b13
1 changed files with 3 additions and 1 deletions
|
@ -104,13 +104,15 @@ ClassroomHandler = class ClassroomHandler extends Handler
|
||||||
return @sendForbiddenError(res) unless classroom.get('ownerID').equals(req.user.get('_id'))
|
return @sendForbiddenError(res) unless classroom.get('ownerID').equals(req.user.get('_id'))
|
||||||
|
|
||||||
for email in req.body.emails
|
for email in req.body.emails
|
||||||
|
joinCode = (classroom.get('codeCamel') or classroom.get('code'))
|
||||||
context =
|
context =
|
||||||
email_id: sendwithus.templates.course_invite_email
|
email_id: sendwithus.templates.course_invite_email
|
||||||
recipient:
|
recipient:
|
||||||
address: email
|
address: email
|
||||||
email_data:
|
email_data:
|
||||||
class_name: classroom.get('name')
|
class_name: classroom.get('name')
|
||||||
join_link: "https://codecombat.com/courses?_cc=" + (classroom.get('codeCamel') or classroom.get('code'))
|
join_link: "https://codecombat.com/courses?_cc=" + joinCode
|
||||||
|
join_code: joinCode
|
||||||
sendwithus.api.send context, _.noop
|
sendwithus.api.send context, _.noop
|
||||||
return @sendSuccess(res, {})
|
return @sendSuccess(res, {})
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue