mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 19:28:35 +00:00
feat(dashboard-v3): migrated folder, imports and snapshots to use only secret path and not folder id
This commit is contained in:
@@ -18,7 +18,7 @@ router.post(
|
||||
);
|
||||
|
||||
router.patch(
|
||||
"/:folderId",
|
||||
"/:folderName",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN]
|
||||
}),
|
||||
@@ -26,7 +26,7 @@ router.patch(
|
||||
);
|
||||
|
||||
router.delete(
|
||||
"/:folderId",
|
||||
"/:folderName",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AuthMode.JWT, AuthMode.SERVICE_TOKEN]
|
||||
}),
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
import express from "express";
|
||||
const router = express.Router();
|
||||
import {
|
||||
requireAuth,
|
||||
requireBlindIndicesEnabled,
|
||||
requireE2EEOff
|
||||
} from "../../middleware";
|
||||
import { requireAuth, requireBlindIndicesEnabled, requireE2EEOff } from "../../middleware";
|
||||
import { secretsController } from "../../controllers/v3";
|
||||
import {
|
||||
AuthMode
|
||||
} from "../../variables";
|
||||
import { AuthMode } from "../../variables";
|
||||
|
||||
router.get(
|
||||
"/raw",
|
||||
@@ -85,6 +79,40 @@ router.get(
|
||||
secretsController.getSecrets
|
||||
);
|
||||
|
||||
// akhilmhdh: dont put batch router below the individual operation as those have arbitory name as params
|
||||
router.post(
|
||||
"/batch",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY, AuthMode.SERVICE_TOKEN]
|
||||
}),
|
||||
requireBlindIndicesEnabled({
|
||||
locationWorkspaceId: "body"
|
||||
}),
|
||||
secretsController.createSecretByNameBatch
|
||||
);
|
||||
|
||||
router.patch(
|
||||
"/batch",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY, AuthMode.SERVICE_TOKEN]
|
||||
}),
|
||||
requireBlindIndicesEnabled({
|
||||
locationWorkspaceId: "body"
|
||||
}),
|
||||
secretsController.updateSecretByNameBatch
|
||||
);
|
||||
|
||||
router.delete(
|
||||
"/batch",
|
||||
requireAuth({
|
||||
acceptedAuthModes: [AuthMode.JWT, AuthMode.API_KEY, AuthMode.SERVICE_TOKEN]
|
||||
}),
|
||||
requireBlindIndicesEnabled({
|
||||
locationWorkspaceId: "body"
|
||||
}),
|
||||
secretsController.deleteSecretByNameBatch
|
||||
);
|
||||
|
||||
router.post(
|
||||
"/:secretName",
|
||||
requireAuth({
|
||||
|
||||
Reference in New Issue
Block a user