Renamed functions to match hook names

This commit is contained in:
Egil Moeller 2012-02-25 16:53:15 +01:00
parent f2cfb4eee5
commit 6754eed9b4
6 changed files with 10 additions and 10 deletions

View file

@ -1,6 +1,6 @@
var minify = require('./utils/Minify');
exports.expressServer = function (hook_name, args, cb) {
exports.expressCreateServer = function (hook_name, args, cb) {
//serve minified files
args.app.get('/minified/:filename', minify.minifyJS);
}

View file

@ -4,7 +4,7 @@ var hasPadAccess = require("./padaccess");
var exporthtml = require("./utils/ExportHtml");
var ERR = require("async-stacktrace");
exports.expressServer = function (hook_name, args, cb) {
exports.expressCreateServer = function (hook_name, args, cb) {
//serve read only pad
args.app.get('/ro/:id', function(req, res)
{

View file

@ -1,6 +1,6 @@
var padManager = require('./db/PadManager');
exports.expressServer = function (hook_name, args, cb) {
exports.expressCreateServer = function (hook_name, args, cb) {
//redirects browser to the pad's sanitized url if needed. otherwise, renders the html
args.app.param('pad', function (req, res, next, padId) {
//ensure the padname is valid and the url doesn't end with a /

View file

@ -1,6 +1,6 @@
var path = require('path');
exports.expressServer = function (hook_name, args, cb) {
exports.expressCreateServer = function (hook_name, args, cb) {
//serve index.html under /
args.app.get('/', function(req, res)

View file

@ -1,7 +1,7 @@
var path = require('path');
var minify = require('./utils/Minify');
exports.expressServer = function (hook_name, args, cb) {
exports.expressCreateServer = function (hook_name, args, cb) {
//serve static files
args.app.get('/static/js/require-kernel.js', function (req, res, next) {
res.header("Content-Type","application/javascript; charset: utf-8");

View file

@ -1,10 +1,10 @@
{
"parts": [
{ "name": "static", "hooks": { "expressCreateServer": "../static:expressServer" } },
{ "name": "specialpages", "hooks": { "expressCreateServer": "../specialpages:expressServer" } },
{ "name": "padurlsanitize", "hooks": { "expressCreateServer": "../padurlsanitize:expressServer" } },
{ "name": "minified", "hooks": { "expressCreateServer": "../minified:expressServer" } },
{ "name": "padreadonly", "hooks": { "expressCreateServer": "../padreadonly:expressServer" } },
{ "name": "static", "hooks": { "expressCreateServer": "../static:expressCreateServer" } },
{ "name": "specialpages", "hooks": { "expressCreateServer": "../specialpages:expressCreateServer" } },
{ "name": "padurlsanitize", "hooks": { "expressCreateServer": "../padurlsanitize:expressCreateServer" } },
{ "name": "minified", "hooks": { "expressCreateServer": "../minified:expressCreateServer" } },
{ "name": "padreadonly", "hooks": { "expressCreateServer": "../padreadonly:expressCreateServer" } },
{ "name": "webaccess", "hooks": { "expressConfigure": "../webaccess:expressConfigure" } },
{ "name": "apicalls", "hooks": { "expressCreateServer": "../apicalls:expressCreateServer" } },
{ "name": "importexport", "hooks": { "expressCreateServer": "../importexport:expressCreateServer" } },