diff --git a/routes/discordactions.js b/routes/discordactions.js index 1d7621787..3869eca58 100644 --- a/routes/discordactions.js +++ b/routes/discordactions.js @@ -30,19 +30,11 @@ const ROLES = require("../constants/roles"); const { Services } = require("../constants/bot"); const { verifyCronJob } = require("../middlewares/authorizeBot"); const { authorizeAndAuthenticate } = require("../middlewares/authorizeUsersAndService"); -const { devFlagMiddleware } = require("../middlewares/devFlag"); const router = express.Router(); router.post("/groups", authenticate, checkIsVerifiedDiscord, validateGroupRoleBody, createGroupRole); router.get("/groups", authenticate, checkIsVerifiedDiscord, getAllGroupRoles); -router.delete( - "/groups/:groupId", - authenticate, - checkIsVerifiedDiscord, - authorizeRoles([SUPERUSER]), - devFlagMiddleware, - deleteGroupRole -); +router.delete("/groups/:groupId", authenticate, checkIsVerifiedDiscord, authorizeRoles([SUPERUSER]), deleteGroupRole); router.post("/roles", authenticate, checkIsVerifiedDiscord, validateMemberRoleBody, addGroupRoleToMember); router.get("/invite", authenticate, getUserDiscordInvite); router.post("/invite", authenticate, checkCanGenerateDiscordLink, generateInviteForUser); diff --git a/test/integration/discordactions.test.js b/test/integration/discordactions.test.js index d943f85e6..574ea4858 100644 --- a/test/integration/discordactions.test.js +++ b/test/integration/discordactions.test.js @@ -233,18 +233,6 @@ describe("Discord actions", function () { await cleanDb(); }); - it("should return 404 when not in dev mode", function (done) { - chai - .request(app) - .delete(`/discord-actions/groups/${groupId}`) - .set("cookie", `${cookieName}=${superUserAuthToken}`) - .end((err, res) => { - expect(res).to.have.status(404); - expect(res.body.error).to.equal("Not Found"); - done(err); - }); - }); - it("should return 404 if group role not found", function (done) { sinon.stub(discordRolesModel, "isGroupRoleExists").resolves({ roleExists: false,