Fixed export.

This commit is contained in:
SamTV12345 2024-10-01 21:24:47 +02:00
parent 6b6f9e535f
commit c8b5dc269a

View file

@ -25,8 +25,8 @@ exports.expressCreateServer = (hookName:string, args:ArgsExpressType, cb:Functio
}); });
// handle export requests // handle export requests
args.app.use('/p/:pad/:rev{.:ext}/export/:type', limiter); args.app.use('/p/:pad{/:rev}/export/:type', limiter);
args.app.get('/p/:pad/:rev{.:ext}/export/:type', (req:any, res:any, next:Function) => { args.app.get('/p/:pad{/:rev}/export/:type', (req:any, res:any, next:Function) => {
(async () => { (async () => {
const types = ['pdf', 'doc', 'txt', 'html', 'odt', 'etherpad']; const types = ['pdf', 'doc', 'txt', 'html', 'odt', 'etherpad'];
// send a 404 if we don't support this filetype // send a 404 if we don't support this filetype