Skip to content

Commit

Permalink
fix: yarn.lock and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
omarciovsena committed Feb 15, 2024
1 parent b1784a5 commit 8837935
Show file tree
Hide file tree
Showing 2 changed files with 2,304 additions and 3,057 deletions.
18 changes: 9 additions & 9 deletions controllers/verse.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ export const search = async (req, res) => {

var expression = new RegExp(
'' +
search
.toLowerCase()
.split(' ')
.map(function (word) {
return '(?=.*' + diacriticSensitiveRegex(word) + ')'
})
.join('') +
'.+'
search
.toLowerCase()
.split(' ')
.map(function (word) {
return '(?=.*' + diacriticSensitiveRegex(word) + ')'
})
.join('') +
'.+'
)

const verses = await Verse.find({
version,
text: {$regex: expression, $options: 'i' }
text: { $regex: expression, $options: 'i' }
})

res.json({
Expand Down
Loading

0 comments on commit 8837935

Please sign in to comment.