Skip to content

Commit

Permalink
Change: request edit_config_family_all alongside edit_config_family
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored and timopollmeier committed Oct 31, 2023
1 parent 0cc93c7 commit 1237e39
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/gmp/commands/scanconfigs.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,21 @@ export class ScanConfigCommand extends EntityCommand {
}

editScanConfigFamilySettings({id, familyName}) {
return this.httpGet({
const get = this.httpGet({
cmd: 'edit_config_family',
id,
family: familyName,
}).then(response => {
});
const all = this.httpGet({
cmd: 'edit_config_family_all',
id,
family: familyName,
});
return Promise.all([get, all]).then(([response, response_all]) => {
const {data} = response;
const data_all = response_all.data;
const config_resp = data.get_config_family_response;
const config_resp_all = data_all.get_config_family_response;
const settings = {};

const nvts = {};
Expand All @@ -142,7 +150,7 @@ export class ScanConfigCommand extends EntityCommand {
nvts[oid] = true;
});

settings.nvts = map(config_resp.all.get_nvts_response.nvt, nvt => {
settings.nvts = map(config_resp_all.get_nvts_response.nvt, nvt => {
nvt.oid = nvt._oid;
delete nvt._oid;

Expand Down

0 comments on commit 1237e39

Please sign in to comment.