Skip to content

Commit

Permalink
fix-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
natlibfi-jonollil committed Nov 14, 2024
1 parent e3ded28 commit 82d2cf3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/urlRoute.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default function (urlWhiteList) {
function handleHook(req, res) {
const {triggerUrl} = req.query;

if (!urlWhiteList.some(urlRegexp => new RegExp(urlRegexp, 'u').test(url))) {
res.status(httpStatus.FORBIDDEN).json({status: 403});
if (!urlWhiteList.some(urlRegexp => new RegExp(urlRegexp, 'u').test(triggerUrl))) {
return res.status(httpStatus.FORBIDDEN).json({status: 403});
}

const data = req.body;
Expand All @@ -32,4 +32,4 @@ export default function (urlWhiteList) {
);
res.status(httpStatus.OK).json({status: 200});
}
}
}

0 comments on commit 82d2cf3

Please sign in to comment.