Skip to content

Commit

Permalink
Local Bug Fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubh-Nisar committed Oct 20, 2023
1 parent e2f358a commit 5fd5bc8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Code/backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ const PORT = process.env.PORT || 5000;
app.listen(
PORT,
console.log(
`Server running in ${process.env.NODE_ENV} mode on port ${PORT}`.yellow
.bold,
),
`Server running in ${process.env.NODE_ENV} mode on port ${PORT}`.yellow.bold
)
);

module.exports = {
Expand Down
6 changes: 3 additions & 3 deletions Code/backend/controllers/recipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function getRecipes({
return { recipesList, totalNumRecipes };
} catch (e) {
console.error(
`Unable to convert cursor to array or problem counting documents, ${e}`,
`Unable to convert cursor to array or problem counting documents, ${e}`
);
return { recipesList: [], totalNumRecipes: 0 };
}
Expand Down Expand Up @@ -151,7 +151,7 @@ async function apiPostRecipes(req, res, next) {
} catch (err) {
console.log(err);
throw new Error.BadRequestError(
"There is something wrong with the Add Recipe Form",
"There is something wrong with the Add Recipe Form"
);
}
}
Expand Down Expand Up @@ -201,7 +201,7 @@ async function apiGetRecipes(req, res, next) {
} catch (error) {
console.log(error);
throw new Error.BadRequestError(
"There was error processing your queries. Please try again",
"There was error processing your queries. Please try again"
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Code/backend/models/recipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const recipeSchema = new Schema(
ref: "user",
},
},
{ collection: "recipe" },
{ collection: "recipe" }
);

const Recipe = mongoose.model("Recipe", recipeSchema);
Expand Down

0 comments on commit 5fd5bc8

Please sign in to comment.