mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-17 02:47:35 +00:00
feature secret rotations v2
This commit is contained in:
@@ -119,14 +119,10 @@ export const secretSyncServiceFactory = ({
|
||||
{ destination, syncName, projectId }: TFindSecretSyncByNameDTO,
|
||||
actor: OrgServiceActor
|
||||
) => {
|
||||
const folders = await folderDAL.findByProjectId(projectId);
|
||||
|
||||
// we prevent conflicting names within a project so this will only return one at most
|
||||
const [secretSync] = await secretSyncDAL.find({
|
||||
// we prevent conflicting names within a project
|
||||
const secretSync = await secretSyncDAL.findOne({
|
||||
name: syncName,
|
||||
$in: {
|
||||
folderId: folders.map((folder) => folder.id)
|
||||
}
|
||||
projectId
|
||||
});
|
||||
|
||||
if (!secretSync)
|
||||
|
||||
Reference in New Issue
Block a user