mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-30 09:48:53 +00:00
I added authentication token for allow IOU or IOS templates to be created
This commit is contained in:
parent
f055836f44
commit
4f90a6d1fd
@ -135,9 +135,9 @@ export class AddIosTemplateComponent implements OnInit {
|
||||
this.uploader.queue.forEach((elem) => (elem.url = url));
|
||||
|
||||
const itemToUpload = this.uploader.queue[0];
|
||||
(itemToUpload as any).options.disableMultipart = true;
|
||||
|
||||
if ((itemToUpload as any).options) (itemToUpload as any).options.disableMultipart = true; ((itemToUpload as any).options.headers = [{ name: 'Authorization', value: 'Bearer ' + this.server.authToken }])
|
||||
this.uploader.uploadItem(itemToUpload);
|
||||
|
||||
}
|
||||
|
||||
addTemplate() {
|
||||
|
@ -106,11 +106,13 @@ export class AddIouTemplateComponent implements OnInit {
|
||||
this.uploader.queue.forEach((elem) => (elem.url = url));
|
||||
|
||||
const itemToUpload = this.uploader.queue[0];
|
||||
(itemToUpload as any).options.disableMultipart = true;
|
||||
|
||||
if ((itemToUpload as any).options) (itemToUpload as any).options.disableMultipart = true; ((itemToUpload as any).options.headers = [{ name: 'Authorization', value: 'Bearer ' + this.server.authToken }])
|
||||
this.uploader.uploadItem(itemToUpload);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
goBack() {
|
||||
this.router.navigate(['/server', this.server.id, 'preferences', 'iou', 'templates']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user