mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 08:29:55 +00:00
add secret groups field functionality
This commit is contained in:
@@ -754,9 +754,35 @@ const getAppsNorthflank = async ({ accessToken }: { accessToken: string }) => {
|
||||
return {
|
||||
name: a.name,
|
||||
appId: a.id,
|
||||
secretGroups: []
|
||||
};
|
||||
});
|
||||
|
||||
for (let i = 0; i < apps.length; i++) {
|
||||
const appName = apps[i].name;
|
||||
const {
|
||||
data: {
|
||||
data: {
|
||||
secrets
|
||||
}
|
||||
}
|
||||
} = await standardRequest.get(
|
||||
`${INTEGRATION_NORTHFLANK_API_URL}/v1/projects/${appName}/secrets`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
"Accept-Encoding": "application/json",
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
const secretGroups = secrets.map((a: any) => {
|
||||
return a.id
|
||||
});
|
||||
|
||||
apps[i].secretGroups = secretGroups
|
||||
}
|
||||
|
||||
return apps;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user