Project

General

Profile

« Previous | Next » 

Revision 52780

added authorization check to some post methods

View differences:

sr-data.component.ts
18 18
  HelpContentComponent
19 19
} from "../../../shared/reusablecomponents/help-content.component";
20 20
import {ConfirmationDialogComponent} from "../../../shared/reusablecomponents/confirmation-dialog.component";
21
import {AuthenticationService} from "../../../services/authentication.service";
21 22

  
22 23
@Component ({
23 24
  selector: 'app-sr-data',
......
210 211
      response => {
211 212
        if (response) {
212 213
          this.repo = response;
213
          console.log(`updateInterface responded: ${JSON.stringify(response)}`);
214
          console.log(`updateRepository responded: ${response.id}, ${response.registeredBy}`);
214 215
        }
215 216
      },
216 217
      error => {
......
229 230
      let failed: boolean = false;
230 231
      for (let intrf of this.repoInterfaces) {
231 232
        if (intrf.id) {
232
          this.repoService.updateInterface(this.repo.id, intrf).subscribe(
233
          this.repoService.updateInterface(this.repo.id, this.repo.registeredBy, intrf).subscribe(
233 234
            response => {
234 235
              console.log(`updateRepository responded ${JSON.stringify(response)}`);
235 236
              intrf = response;
......
240 241
            }
241 242
          );
242 243
        } else {
243
          this.repoService.addInterface(this.repo.datasourceType, this.repo.id, intrf).subscribe (
244
          this.repoService.addInterface(this.repo.datasourceType, this.repo.id, this.repo.registeredBy, intrf).subscribe (
244 245
            addedInterface => {
245 246
              console.log(`addInterface responded ${JSON.stringify(addedInterface)}`);
246 247
              intrf = addedInterface;

Also available in: Unified diff