Skip to content

Commit

Permalink
removed feature flag (#2281)
Browse files Browse the repository at this point in the history
  • Loading branch information
VaibhavSingh8 authored Dec 3, 2024
1 parent 4e5f5da commit aaa2de4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
10 changes: 1 addition & 9 deletions routes/discordactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions test/integration/discordactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit aaa2de4

Please sign in to comment.