mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-11-02 01:15:31 +00:00
chore(groups): Enable updating groups without roles or providers (#6498)
This commit is contained in:
1 parent
1108d90768
commit
a65ca72177
4 files changed
+27
-20
No files matched your search
@@ -171,14 +171,13 @@ export const updateProviderGroup = async (
|
||||
};
|
||||
|
||||
// Add relationships only if there are items
|
||||
if (providers.length > 0) {
|
||||
if (providers.length >= 0) {
|
||||
payload.data.relationships!.providers = { data: providers };
|
||||
}
|
||||
|
||||
if (roles.length > 0) {
|
||||
if (roles.length >= 0) {
|
||||
payload.data.relationships!.roles = { data: roles };
|
||||
}
|
||||
|
||||
try {
|
||||
const url = `${keyServer}/provider-groups/${providerGroupId}`;
|
||||
const response = await fetch(url, {
|
||||
|
||||
Reference in new issue
Block a user