/*
* Email WebHook module manage all email callbacks records
*/

const emailTracking = {},
      winstonLogger = require('./../../utils/winston'),
      common = require('./../../utils/common');

// define email WebHook module
(function(emailWebhook){

  // listen octane email callbacks
  emailTracking.octaneEmail = function(params){
      // start logging of email callback
      winstonLogger.init('octaneEmail_'+params.qstring.app_id, true);
      winstonLogger.writeData(params.qstring);

      // return reqponse
      return common.returnMessage(params, 200, 'Success');
  }
}(emailTracking));

// export module globaly
module.exports = emailTracking;
