lib/middleware/themes.js
function importTheme(req, res, next) {
  req.appformsResultPayload = req.appformsResultPayload || {};
  var themeData = (req.appformsResultPayload.data && req.appformsResultPayload.type === constants.resultTypes.themeTemplate) ? req.appformsResultPayload.data : undefined ;

  var importThemeParams = {
    theme: themeData,
    name: req.body.name,
    description: req.body.description,
    userEmail: req.user.email
  };

  forms.cloneTheme(_.extend(req.connectionOptions, importThemeParams), resultHandler(constants.resultTypes.themes, req, next));
}
function importTheme(req, res, next) {
  req.appformsResultPayload = req.appformsResultPayload || {};
  var themeData = (req.appformsResultPayload.data && req.appformsResultPayload.type === constants.resultTypes.themeTemplate) ? req.appformsResultPayload.data : undefined ;

  var importThemeParams = {
    theme: themeData,
    name: req.body.name,
    description: req.body.description,
    userEmail: req.user.email
  };

  forms.cloneTheme(_.extend(req.connectionOptions, importThemeParams), resultHandler(constants.resultTypes.themes, req, next));
}
function importTheme ( req , res , next ) { req . appformsResultPayload = req . appformsResultPayload || { } ; var themeData = ( req . appformsResultPayload . data && req . appformsResultPayload . type === constants . resultTypes . themeTemplate ) ? req . appformsResultPayload . data : undefined ; var importThemeParams = { theme : themeData , name : req . body . name , description : req . body . description , userEmail : req . user . email } ; forms . cloneTheme ( _ . extend ( req . connectionOptions , importThemeParams ) , resultHandler ( constants . resultTypes . themes , req , next ) ) ; }
Importing A Theme From A Template
Importing A Theme From A Template