Skip to content

Commit aaa2de4

Browse files
removed feature flag (#2281)
1 parent 4e5f5da commit aaa2de4

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

routes/discordactions.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,11 @@ const ROLES = require("../constants/roles");
3030
const { Services } = require("../constants/bot");
3131
const { verifyCronJob } = require("../middlewares/authorizeBot");
3232
const { authorizeAndAuthenticate } = require("../middlewares/authorizeUsersAndService");
33-
const { devFlagMiddleware } = require("../middlewares/devFlag");
3433
const router = express.Router();
3534

3635
router.post("/groups", authenticate, checkIsVerifiedDiscord, validateGroupRoleBody, createGroupRole);
3736
router.get("/groups", authenticate, checkIsVerifiedDiscord, getAllGroupRoles);
38-
router.delete(
39-
"/groups/:groupId",
40-
authenticate,
41-
checkIsVerifiedDiscord,
42-
authorizeRoles([SUPERUSER]),
43-
devFlagMiddleware,
44-
deleteGroupRole
45-
);
37+
router.delete("/groups/:groupId", authenticate, checkIsVerifiedDiscord, authorizeRoles([SUPERUSER]), deleteGroupRole);
4638
router.post("/roles", authenticate, checkIsVerifiedDiscord, validateMemberRoleBody, addGroupRoleToMember);
4739
router.get("/invite", authenticate, getUserDiscordInvite);
4840
router.post("/invite", authenticate, checkCanGenerateDiscordLink, generateInviteForUser);

test/integration/discordactions.test.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -233,18 +233,6 @@ describe("Discord actions", function () {
233233
await cleanDb();
234234
});
235235

236-
it("should return 404 when not in dev mode", function (done) {
237-
chai
238-
.request(app)
239-
.delete(`/discord-actions/groups/${groupId}`)
240-
.set("cookie", `${cookieName}=${superUserAuthToken}`)
241-
.end((err, res) => {
242-
expect(res).to.have.status(404);
243-
expect(res.body.error).to.equal("Not Found");
244-
done(err);
245-
});
246-
});
247-
248236
it("should return 404 if group role not found", function (done) {
249237
sinon.stub(discordRolesModel, "isGroupRoleExists").resolves({
250238
roleExists: false,

0 commit comments

Comments
 (0)