feat(rbac): resolved merge conflict

This commit is contained in:
Akhil Mohan
2023-09-08 21:22:36 +05:30
parent 6671699867
commit ea9e638d03
11 changed files with 81 additions and 63 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
import express from "express";
const router = express.Router();
import {
requireAuth
} from "../../middleware";
import { requireAuth } from "../../middleware";
import { AuthMode } from "../../variables";
import { integrationController } from "../../controllers/v1";
+1 -11
View File
@@ -23,18 +23,8 @@ router.put(
router.patch(
"/:workspaceId/environments",
requireAuth({
acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY],
acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY]
}),
requireWorkspaceAuth({
acceptedRoles: [ADMIN, MEMBER],
locationWorkspaceId: "params",
}),
param("workspaceId").exists().trim(),
body("environmentSlug").exists().isString().trim(),
body("environmentName").exists().isString().trim(),
body("otherEnvironmentSlug").exists().isString().trim(),
body("otherEnvironmentName").exists().isString().trim(),
validateRequest,
environmentController.reorderWorkspaceEnvironments
);