const Facebook = require('../../lib/facebook');

/**
 * Example:
 *  Facebook.doGetEvents(function (err, result) {...})
 */
module.exports.events = function (next) {
  Facebook.getOSDIEvents(function (err, osdiEvents) {
    if (err) {
      console.log('Error: ' + JSON.stringify(err));
      next(err);
      return;
    }
    const response = {
      total_pages: 1,
      per_page: osdiEvents.length,
      page: 1,
      total_records: osdiEvents.length,
      _embedded: {
        'osdi:events': osdiEvents
      }
    };
    next(null, response);
  });
};

@@ -75,14 +75,9 @@
 ook.
-doGetE
+e
 vent

fix comments