Skip to content

Commit

Permalink
fixed bug introduced last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammedArab1 committed Jul 3, 2024
1 parent cfebcc9 commit 3e93add
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion API/src/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const typeDefs = `#graphql
`;

const handleBookDoesntExist = async (bookId) => {
const listOfBooks = await utils.returnBookIds();
const listOfBooks = await utils.returnBookIds(BookNamesModelV2);
if (!listOfBooks.includes(bookId)) {
throw new Error('Invalid book');
}
Expand Down
3 changes: 0 additions & 3 deletions API/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
const BookNamesModel = require("../../V1/DB/models/bookName")
const BookNamesModelV2 = require("../../V2/DB/models/bookNameV2")

const escapeRegExp = (string) => {
return string.toString().replace(/[.*+?^${}|()[\]\\]/g, "\\$&"); // $& means the whole matched string
};
Expand Down

0 comments on commit 3e93add

Please sign in to comment.