mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Renamed functions to match hook names
This commit is contained in:
parent
f2cfb4eee5
commit
6754eed9b4
6 changed files with 10 additions and 10 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 /
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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" } },
|
||||
|
|
Loading…
Reference in a new issue