feat: allow file uploading on registration interstitial

This commit is contained in:
Andrew Rodrigues
2019-04-15 12:33:57 -04:00
parent 8778f00b69
commit ddffc904f4
3 changed files with 8 additions and 2 deletions

View File

@@ -152,6 +152,7 @@ authenticationController.registerComplete = function (req, res, next) {
var callbacks = data.interstitials.reduce(function (memo, cur) {
if (cur.hasOwnProperty('callback') && typeof cur.callback === 'function') {
req.body.files = req.files;
memo.push(function (next) {
cur.callback(req.session.registration, req.body, function (err) {
// Pass error as second argument so all callbacks are executed