mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
padaccess: Delete useless try/catch
This commit is contained in:
parent
329d037431
commit
951d369e3f
1 changed files with 10 additions and 15 deletions
|
@ -3,7 +3,6 @@ const securityManager = require('./db/SecurityManager');
|
||||||
|
|
||||||
// checks for padAccess
|
// checks for padAccess
|
||||||
module.exports = async (req, res) => {
|
module.exports = async (req, res) => {
|
||||||
try {
|
|
||||||
const {session: {user} = {}} = req;
|
const {session: {user} = {}} = req;
|
||||||
const accessObj = await securityManager.checkAccess(
|
const accessObj = await securityManager.checkAccess(
|
||||||
req.params.pad, req.cookies.sessionID, req.cookies.token, user);
|
req.params.pad, req.cookies.sessionID, req.cookies.token, user);
|
||||||
|
@ -16,8 +15,4 @@ module.exports = async (req, res) => {
|
||||||
res.status(403).send("403 - Can't touch this");
|
res.status(403).send("403 - Can't touch this");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
|
||||||
// @TODO - send internal server error here?
|
|
||||||
throw err;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue