import: Allow import if pad does not yet exist

This commit is contained in:
Richard Hansen 2020-10-01 21:27:23 -04:00 committed by John McLear
parent ed6fcefb67
commit 831528e8bc
2 changed files with 0 additions and 15 deletions

View file

@ -62,11 +62,6 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// handle import requests
args.app.use('/p/:pad/import', limiter);
args.app.post('/p/:pad/import', async function(req, res, next) {
if (!(await padManager.doesPadExists(req.params.pad))) {
console.warn(`Someone tried to import into a pad that doesn't exist (${req.params.pad})`);
return next();
}
const {session: {user} = {}} = req;
const {accessStatus, authorID} = await securityManager.checkAccess(
req.params.pad, req.cookies.sessionID, req.cookies.token, req.cookies.password, user);