From 2c81ca33e727dad1194acc2065c610c9685ba13e Mon Sep 17 00:00:00 2001 From: SamTv12345 Date: Tue, 20 Aug 2024 15:05:38 +0200 Subject: [PATCH] Fixed errors in pad --- src/node/hooks/express/specialpages.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node/hooks/express/specialpages.ts b/src/node/hooks/express/specialpages.ts index 9347767de..decba3623 100644 --- a/src/node/hooks/express/specialpages.ts +++ b/src/node/hooks/express/specialpages.ts @@ -194,7 +194,7 @@ const handleLiveReload = async (args: ArgsExpressType, padString: string, timeSl }) } -exports.expressCreateServer = async (hookName: string, args: any, cb: Function) => { +exports.expressCreateServer = async (hookName: string, args: ArgsExpressType, cb: Function) => { const padString = eejs.require('ep_etherpad-lite/templates/padBootstrap.js', { pluginModules: (() => { const pluginModules = new Set(); @@ -280,9 +280,9 @@ exports.expressCreateServer = async (hookName: string, args: any, cb: Function) // serve pad.html under /p - args.app.get('/p/:pad', (req: any, res: any, next: Function) => { + args.app.get('/p/:pad', (req, res) => { // The below might break for pads being rewritten - const isReadOnly = !webaccess.userCanModify(req.padId, req); + const isReadOnly = !webaccess.userCanModify(req.params.pad, req); hooks.callAll('padInitToolbar', { toolbar,