Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. module.exports = advisors;
  2.  
  3. function advisors(options, callback) {
  4.   return new advisors.Advisors(options, callback);
  5. }
  6.  
  7. advisors.Advisors = function(options, callback) {
  8.   var self = this;
  9.  
  10.   module.exports.Super.call(this, options, null);
  11.   self._apos.mixinModuleEmail(self);
  12.   self.beforeSave = function(req, snippet, callback) {
  13.     console.log('look at my body', req.body, req.category);
  14.     req.tags = req.category;
  15.     callback();
  16.   };
  17.  
  18.   self.afterSubmission = function(req, snippet, callback) {
  19.     // some stuff that runs here works very well (:
  20.   };
  21.  
  22.   // Must wait at least until next tick to invoke callback!
  23.   if (callback) {
  24.     process.nextTick(function() { return callback(null); });
  25.   }
  26.  
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement