Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public addSecurityRequirement(event: SecurityRequirementEditorEvent): void {
console.info("[SecurityRequirementsSectionComponent] Adding security requirement: ", event);
let requirement: OasSecurityRequirement = this.parent.createSecurityRequirement();
Library.readNode(event.data, requirement);
let command: ICommand = CommandFactory.createAddSecurityRequirementCommand(this.parent, requirement);
this.commandService.emit(command);
}
public changeSecurityRequirement(event: SecurityRequirementEditorEvent): void {
let newRequirement: OasSecurityRequirement = this.parent.createSecurityRequirement();
Library.readNode(event.data, newRequirement);
let command: ICommand = CommandFactory.createReplaceSecurityRequirementCommand(event.entity, newRequirement);
this.commandService.emit(command);
}