Skip to content

Commit

Permalink
Swapping the middlewares of limiter and isAuthenticated
Browse files Browse the repository at this point in the history
  • Loading branch information
blazenn2 committed Oct 8, 2023
1 parent 00e1b37 commit b5281c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ app.get("/create-course", csrfProtection, limiter, isAuthenticated, async functi
return res.render("course-create", { messageError: req.flash("error"), messageSuccess: req.flash("success"), csrfToken: req.csrfToken() });
});

app.post("/create-course", isAuthenticated, csrfProtection, limiter, async function (req, res) {
app.post("/create-course", limiter, isAuthenticated, csrfProtection, async function (req, res) {
// TODO: Need to implement upload image logic
try {
const { courseName, shortDescription, longDescription, duration, durationType, imageFile, difficulty } = req.body;
Expand Down

0 comments on commit b5281c2

Please sign in to comment.