Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedArab1 committed Jun 11, 2024
1 parent 1136c7e commit 75e68d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions API/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var queryHandler = (model) => {
{ arabicText: { $regex } },
{ _id: 0, __v: 0 },
);
hadiths = {
const hadiths = {
englishQueryResults,
arabicQueryResults,
};
Expand Down Expand Up @@ -213,7 +213,7 @@ var queryPerBookHandler = (model) =>{
{ arabicText: { $regex }, bookId: request.params.bookId },
{ _id: 0, __v: 0 },
);
hadiths = {
const hadiths = {
englishQueryResults,
arabicQueryResults,
};
Expand Down
2 changes: 1 addition & 1 deletion API/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import BookNamesModel from '../../V1/DB/models/bookName.js';

export const escapeRegExp = (string) => {
return string.toString().replace(/[.*+?^${}|()[\]\\]/g, '\\$&'); // $& means the whole matched string
return string.toString().replace(/[.*+?^${}()[\]\\]/g, '\\$&'); // $& means the whole matched string
};
export const returnBookIds = async () => {
const bookNames = await BookNamesModel.find({});
Expand Down

0 comments on commit 75e68d4

Please sign in to comment.