Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (33 sloc) 0.914 kb
/**
* class <%name%>
*
* <%description%>
*
* Copyright 2012 Ajax.org Services B.V.
*
* This product includes software developed by
* Ajax.org Services B.V. (http://www.ajax.org/).
*
* Author: Mike de Boer <mike@ajax.org>
**/
"use strict";
var Fs = require("fs");
var Util = require("./../../util");
var error = require("./../../error");
var GithubHandler = module.exports = function(client) {
this.client = client;
this.routes = JSON.parse(Fs.readFileSync(__dirname + "/routes.json", "utf8"));
};
var proto = {
sendError: function(err, block, msg, callback) {
Util.log(err, block, msg.user, "error");
if (typeof err == "string")
err = new error.InternalServerError(err);
if (callback)
callback(err);
}
};
[<%scripts%>].forEach(function(api) {
Util.extend(proto, require("./" + api));
});
GithubHandler.prototype = proto;
Jump to Line
Something went wrong with that request. Please try again.