code: function update(req, res, next) {
    var options = req.connectionOptions;
    req.appformsResultPayload = req.appformsResultPayload || {};
  
    var params = {
      userEmail: req.user.email
    };
  
    options = _.extend(options, params);
  
    var form = req.body;
  
    if (_.isObject(req.appformsResultPayload.data) && !req.body._id) {
      form = req.appformsResultPayload.data;
    }
  
    logger.debug("Middleware: Update form: ", {options: options, form: form});
  
    forms.updateForm(options, form, formsResultHandlers(constants.resultTypes.forms, req, next));
  }
docs: Update A Single Existing Form
  @param req
  @param res
  @param next