mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 01:27:41 +00:00
Merge pull request #1105 from G3root/fix-batch-delete-integration
fix: batch deleting secrets not getting synced for integrations
This commit is contained in:
@@ -963,6 +963,14 @@ export const deleteSecretByNameBatch = async (req: Request, res: Response) => {
|
|||||||
authData: req.authData
|
authData: req.authData
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await EventService.handleEvent({
|
||||||
|
event: eventPushSecrets({
|
||||||
|
workspaceId: new Types.ObjectId(workspaceId),
|
||||||
|
environment,
|
||||||
|
secretPath
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
secrets: deletedSecrets
|
secrets: deletedSecrets
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1761,6 +1761,22 @@ export const deleteSecretBatchHelper = async ({
|
|||||||
secretIds: deletedSecrets.map((secret) => secret._id)
|
secretIds: deletedSecrets.map((secret) => secret._id)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const action = await EELogService.createAction({
|
||||||
|
name: ACTION_DELETE_SECRETS,
|
||||||
|
...getAuthDataPayloadIdObj(authData),
|
||||||
|
workspaceId,
|
||||||
|
secretIds: deletedSecrets.map((secret) => secret._id)
|
||||||
|
});
|
||||||
|
|
||||||
|
action &&
|
||||||
|
(await EELogService.createLog({
|
||||||
|
...getAuthDataPayloadIdObj(authData),
|
||||||
|
workspaceId,
|
||||||
|
actions: [action],
|
||||||
|
channel: authData.userAgentType,
|
||||||
|
ipAddress: authData.ipAddress
|
||||||
|
}));
|
||||||
|
|
||||||
await EEAuditLogService.createAuditLog(
|
await EEAuditLogService.createAuditLog(
|
||||||
authData,
|
authData,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user