Revision 52780
Added by Myrto Koukouli about 6 years ago
sr-aggregator.component.ts | ||
---|---|---|
13 | 13 |
} from "../../../shared/reusablecomponents/help-content.component"; |
14 | 14 |
import {ConfirmationDialogComponent} from "../../../shared/reusablecomponents/confirmation-dialog.component"; |
15 | 15 |
import {RepositoryService} from "../../../services/repository.service"; |
16 |
import {AuthenticationService} from "../../../services/authentication.service"; |
|
16 | 17 |
|
17 | 18 |
@Component ({ |
18 | 19 |
selector: 'sr-aggregator', |
... | ... | |
125 | 126 |
this.errorMessage = ''; |
126 | 127 |
this.repoService.addRepository(this.repo.datasourceType, this.repo).subscribe( |
127 | 128 |
response => { |
128 |
console.log(`addRepository responded:\n${JSON.stringify(response)}`);
|
|
129 |
console.log(`addRepository responded: ${response.id}, ${response.registeredBy}`);
|
|
129 | 130 |
this.repo = response; |
130 | 131 |
}, |
131 | 132 |
error => { |
... | ... | |
145 | 146 |
let failed: boolean = false; |
146 | 147 |
for (let intrf of this.repoInterfaces) { |
147 | 148 |
if (intrf.id) { |
148 |
this.repoService.updateInterface(this.repo.id, intrf).subscribe( |
|
149 |
this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf).subscribe(
|
|
149 | 150 |
response => { |
150 | 151 |
console.log(`updateInterface responded ${JSON.stringify(response)}`); |
151 | 152 |
intrf = response; |
... | ... | |
156 | 157 |
} |
157 | 158 |
); |
158 | 159 |
} else { |
159 |
this.repoService.addInterface(this.repo.datasourceType, this.repo.id, intrf).subscribe ( |
|
160 |
this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf).subscribe (
|
|
160 | 161 |
addedInterface => { |
161 | 162 |
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`); |
162 | 163 |
intrf = addedInterface; |
Also available in: Unified diff
added authorization check to some post methods