mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 22:46:24 +00:00
Add DELETE route to API keys
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
requireAuth,
|
||||
validateRequest
|
||||
} from '../../middleware';
|
||||
import { body } from 'express-validator';
|
||||
import { param, body } from 'express-validator';
|
||||
import { apiKeyDataController } from '../../controllers/v2';
|
||||
|
||||
router.get(
|
||||
@@ -26,4 +26,14 @@ router.post(
|
||||
apiKeyDataController.createAPIKeyData
|
||||
);
|
||||
|
||||
router.delete(
|
||||
'/:apiKeyDataId',
|
||||
requireAuth({
|
||||
acceptedAuthModes: ['jwt']
|
||||
}),
|
||||
param('apiKeyDataId').exists().trim(),
|
||||
validateRequest,
|
||||
apiKeyDataController.deleteAPIKeyData
|
||||
);
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user