diff --git a/routes/arts.ts b/routes/arts.ts index 07d71e098..2b7e3c4ad 100644 --- a/routes/arts.ts +++ b/routes/arts.ts @@ -8,7 +8,7 @@ import { devFlagMiddleware } from "../middlewares/devFlag"; router.get("/", arts.fetchArts); router.get("/user/self", authenticate, arts.getSelfArts); // this route is soon going to be deprecated soon, please use /arts/:userId endpoint. router.get("/user/:userId", authenticate, arts.getUserArts); // this route is soon going to be deprecated soon, please use /arts/:userId endpoint. -router.get("/:userId", devFlagMiddleware, authenticate, arts.getUserArts); +router.get("/:userId", authenticate, arts.getUserArts); router.post("/user/add", authenticate, artValidator.createArt, arts.addArt); module.exports = router; diff --git a/test/integration/arts.test.js b/test/integration/arts.test.js index 0721558f3..9977caf24 100644 --- a/test/integration/arts.test.js +++ b/test/integration/arts.test.js @@ -152,7 +152,7 @@ describe("Arts", function () { it("Should get all the arts of the user", function (done) { chai .request(app) - .get(`/arts/${userId}?dev=true`) + .get(`/arts/${userId}`) .set("cookie", `${cookieName}=${jwt}`) .end((err, res) => { if (err) { @@ -172,7 +172,7 @@ describe("Arts", function () { it("Should return 401, for Unauthenticated User", function (done) { chai .request(app) - .get(`/arts/${userId}?dev=true`) + .get(`/arts/${userId}`) .end((err, res) => { if (err) { return done(err); @@ -195,7 +195,7 @@ describe("Arts", function () { chai .request(app) - .get(`/arts/${userId}?dev=true`) + .get(`/arts/${userId}`) .set("cookie", `${cookieName}=${jwt}`) .end((err, res) => { artsQuery.fetchUserArts.restore(); @@ -215,7 +215,7 @@ describe("Arts", function () { chai .request(app) - .get(`/arts/${userId}?dev=true`) + .get(`/arts/${userId}`) .set("cookie", `${cookieName}=${jwt}`) .end((err, res) => { artsQuery.fetchUserArts.restore();