var Service = require('Service');
var util = require('util');

/**
 * 退出
 */
var Quit = function() { 
  Service.call(this);
  this.checkAuthority = false;
};

util.inherits(Quit, Service);

module.exports = Quit;

/**
 * 处理服务请求
 * @param  {Object} req 服务请求对象
 * @param  {Object} res 服务响应对象
 */
Quit.prototype.process =  function(req, res) {  
  
  server.sessionManager.endSession(req.sessionId);
  
  this.end(res);
};
