From b5281c2dbbb8a1b3e3fecd10e082acc7ab7ed8b8 Mon Sep 17 00:00:00 2001 From: Hamza Nawab Date: Sun, 8 Oct 2023 23:24:40 +0500 Subject: [PATCH] Swapping the middlewares of limiter and isAuthenticated --- src/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.js b/src/app.js index df6d641..d61665d 100644 --- a/src/app.js +++ b/src/app.js @@ -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;