Revision 52780
Added by Myrto Koukouli about 6 years ago
datasource-interface-form.component.ts | ||
---|---|---|
296 | 296 |
} |
297 | 297 |
|
298 | 298 |
addInterface() { |
299 |
this.repoService.addInterface(this.currentRepository.datasourceType, this.currentRepository.id, this.currentInterface).subscribe( |
|
299 |
this.repoService.addInterface(this.currentRepository.datasourceType, this.currentRepository.id, this.currentRepository.registeredBy, this.currentInterface).subscribe(
|
|
300 | 300 |
addedInterface => { |
301 | 301 |
console.log(`addInterface responded ${JSON.stringify(addedInterface)}`); |
302 | 302 |
this.currentInterface = addedInterface; |
... | ... | |
321 | 321 |
} |
322 | 322 |
|
323 | 323 |
updateInterface() { |
324 |
this.repoService.updateInterface(this.currentRepository.id, this.currentInterface).subscribe( |
|
324 |
this.repoService.updateInterface(this.currentRepository.id, this.currentRepository.registeredBy, this.currentInterface).subscribe(
|
|
325 | 325 |
response => { |
326 | 326 |
console.log(`updateRepository responded ${JSON.stringify(response)}`); |
327 | 327 |
if (response) { |
... | ... | |
344 | 344 |
|
345 | 345 |
ngOnDestroy() { |
346 | 346 |
if (this.currentInterface && this.currentInterface.id && this.toBeDeleted) { |
347 |
this.repoService.deleteInterface(this.currentInterface.id).subscribe( |
|
347 |
this.repoService.deleteInterface(this.currentInterface.id, this.currentRepository.registeredBy).subscribe(
|
|
348 | 348 |
response => console.log(`deleteInterface responded: ${JSON.stringify(response)}`), |
349 | 349 |
error => console.log(error), |
350 | 350 |
() => console.log(`deleted ${this.currentInterface.id}`) |
Also available in: Unified diff
added authorization check to some post methods