Project

General

Profile

« Previous | Next » 

Revision 52780

added authorization check to some post methods

View differences:

sr-literature.component.ts
23 23
  HelpContentComponent
24 24
} from "../../../shared/reusablecomponents/help-content.component";
25 25
import {ConfirmationDialogComponent} from "../../../shared/reusablecomponents/confirmation-dialog.component";
26
import {AuthenticationService} from "../../../services/authentication.service";
26 27

  
27 28
@Component ({
28 29
  selector:'app-sr-literature',
......
215 216
      response => {
216 217
        if (response) {
217 218
          this.repo = response;
218
          console.log(`updateInterface responded: ${JSON.stringify(response)}`);
219
          console.log(`updateRepository responded: ${response.id}, ${response.registeredBy}`);
219 220
        }
220 221
      },
221 222
      error => {
......
234 235
      let failed: boolean = false;
235 236
      for (let intrf of this.repoInterfaces) {
236 237
        if (intrf.id) {
237
          this.repoService.updateInterface(this.repo.id, intrf).subscribe(
238
          this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf).subscribe(
238 239
            response => {
239 240
              console.log(`updateInterface responded ${JSON.stringify(response)}`);
240 241
              intrf = response;
......
245 246
            }
246 247
          );
247 248
        } else {
248
          this.repoService.addInterface(this.repo.datasourceType, this.repo.id, intrf).subscribe (
249
          this.repoService.addInterface(this.repo.datasourceType, this.repo.registeredBy, this.repo.id, intrf).subscribe (
249 250
            addedInterface => {
250 251
              console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
251 252
              intrf = addedInterface;

Also available in: Unified diff