Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
boutell committed Feb 23, 2024
1 parent 7e9db80 commit e58b5d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ module.exports = {
try {
const slug = req.originalUrl;
const [ pathOnly, queryString ] = slug.split('?');

const results = await self
.find(req, { $or: [ { redirectSlug: slug }, { redirectSlug: pathOnly } ] })
.currentLocaleTarget(false)
Expand Down Expand Up @@ -234,7 +234,10 @@ module.exports = {
}

async function redirect(status, url, redirectMethod = 'rawRedirect') {
const result = { status, url };
const result = {
status,
url
};
await self.emit('beforeRedirect', req, result);
return res[redirectMethod](result.status, result.url);
}
Expand Down

0 comments on commit e58b5d9

Please sign in to comment.