mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
lint: Put opening brace on same line as function
Normally I would let `eslint --fix` do this for me, but there's a bug that causes: const x = function () { // ... }; to become: const x = () => { // ... }; which ESLint thinks is a syntax error. (It probably is; I don't know enough about the automatic semicolon insertion rules to be confident.)
This commit is contained in:
parent
cc988bd67b
commit
7df3ded66f
66 changed files with 1036 additions and 2072 deletions
|
@ -12,24 +12,20 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
})
|
||||
|
||||
//serve index.html under /
|
||||
args.app.get('/', function(req, res)
|
||||
{
|
||||
args.app.get('/', function(req, res) {
|
||||
res.send(eejs.require('ep_etherpad-lite/templates/index.html', {req}));
|
||||
});
|
||||
|
||||
//serve javascript.html
|
||||
args.app.get('/javascript', function(req, res)
|
||||
{
|
||||
args.app.get('/javascript', function(req, res) {
|
||||
res.send(eejs.require('ep_etherpad-lite/templates/javascript.html', {req}));
|
||||
});
|
||||
|
||||
|
||||
//serve robots.txt
|
||||
args.app.get('/robots.txt', function(req, res)
|
||||
{
|
||||
args.app.get('/robots.txt', function(req, res) {
|
||||
var filePath = path.join(settings.root, "src", "static", "skins", settings.skinName, "robots.txt");
|
||||
res.sendFile(filePath, function(err)
|
||||
{
|
||||
res.sendFile(filePath, function(err) {
|
||||
//there is no custom robots.txt, send the default robots.txt which dissallows all
|
||||
if(err)
|
||||
{
|
||||
|
@ -40,8 +36,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
});
|
||||
|
||||
//serve pad.html under /p
|
||||
args.app.get('/p/:pad', function(req, res, next)
|
||||
{
|
||||
args.app.get('/p/:pad', function(req, res, next) {
|
||||
// The below might break for pads being rewritten
|
||||
const isReadOnly =
|
||||
req.url.indexOf("/p/r.") === 0 || !webaccess.userCanModify(req.params.pad, req);
|
||||
|
@ -59,8 +54,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
});
|
||||
|
||||
//serve timeslider.html under /p/$padname/timeslider
|
||||
args.app.get('/p/:pad/timeslider', function(req, res, next)
|
||||
{
|
||||
args.app.get('/p/:pad/timeslider', function(req, res, next) {
|
||||
hooks.callAll("padInitToolbar", {
|
||||
toolbar: toolbar
|
||||
});
|
||||
|
@ -72,12 +66,10 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
|||
});
|
||||
|
||||
//serve favicon.ico from all path levels except as a pad name
|
||||
args.app.get( /\/favicon.ico$/, function(req, res)
|
||||
{
|
||||
args.app.get( /\/favicon.ico$/, function(req, res) {
|
||||
var filePath = path.join(settings.root, "src", "static", "skins", settings.skinName, "favicon.ico");
|
||||
|
||||
res.sendFile(filePath, function(err)
|
||||
{
|
||||
res.sendFile(filePath, function(err) {
|
||||
//there is no custom favicon, send the default favicon
|
||||
if(err)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue