Skip to content

Commit dce648d

Browse files
committed
create subdoc
1 parent e488071 commit dce648d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/routes/surveyRoutes.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ module.exports = app => {
1111
const survey = new Survey({
1212
title,
1313
subject,
14-
body
14+
body,
15+
recipients: recipients.split(',').map(email => ({ email })),
16+
_user: req.user.id,
17+
dateSent: Date.now()
1518
});
1619
});
1720
};

0 commit comments

Comments
 (0)