diff --git a/src/app/pages/affiliations/affiliations.component.ts b/src/app/pages/affiliations/affiliations.component.ts index 0c23412..f22e0e2 100644 --- a/src/app/pages/affiliations/affiliations.component.ts +++ b/src/app/pages/affiliations/affiliations.component.ts @@ -168,10 +168,10 @@ export class AffiliationsComponent implements OnInit { addAffiliation() { if (!this.isEmptyAffiliation()) { - this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.logo_url).subscribe((logo_url)=> { + this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url=' + this.affiliation.logo_url).subscribe((logo_url)=> { this.affiliation.logo_url = logo_url; - this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.website_url).subscribe((website_url) => { + this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url='+ this.affiliation.website_url).subscribe((website_url) => { this.affiliation.website_url = website_url; if (!this.curatorAffiliations) { diff --git a/src/app/pages/curator/curator.component.ts b/src/app/pages/curator/curator.component.ts index 19aa0e1..9318613 100644 --- a/src/app/pages/curator/curator.component.ts +++ b/src/app/pages/curator/curator.component.ts @@ -59,7 +59,7 @@ export class CuratorComponent implements OnInit { this.curator = curator; this.curator.email = Session.getUserEmail(); if (this.curator.photo && this.curator.photo !== '') { - this.photo = this.properties.downloadUrl + '/' + this.curator.photo; + this.photo = this.properties.utilsService + '/download/' + this.curator.photo; } else { this.photo = '../../../assets/common-assets/curator-default.png'; } @@ -102,7 +102,7 @@ export class CuratorComponent implements OnInit { this.curator = curator; this.curator.email = Session.getUserEmail(); if (this.curator.photo && this.curator.photo !== '') { - this.photo = this.properties.downloadUrl + '/' + this.curator.photo; + this.photo = this.properties.utilsService + '/download/' + this.curator.photo; } else { this.photo = '../../../assets/common-assets/curator-default.png'; } @@ -193,9 +193,9 @@ export class CuratorComponent implements OnInit { if ((this.hasChanged || this.affiliationsChanged) && this.curator && this.curator.name && this.curator.name !== '') { this.showLoading = true; if (this.file) { - this.utilitiesService.uploadPhoto(this.properties.uploadService + '/' + this.curator._id, this.file).subscribe((res) => { + this.utilitiesService.uploadPhoto(this.properties.utilsService + '/upload/' + this.curator._id, this.file).subscribe((res) => { if (this.curator.photo && this.curator.photo !== '') { - this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe(); + this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe(); } this.curator.photo = res.filename; this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator', @@ -215,7 +215,7 @@ export class CuratorComponent implements OnInit { ); } else { if(this.deletePhoto) { - this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe(); + this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe(); this.curator.photo = ''; } this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator', diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index 063fd82..60b22b8 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -32,9 +32,7 @@ "ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", "helpdesk" : "https://www.openaire.eu/support/helpdesk", "uploadService" : "http://mpagasas.di.uoa.gr:8001/upload", - "downloadUrl" : "http://mpagasas.di.uoa.gr:8001/download", - "deleteUrl" : "http://mpagasas.di.uoa.gr:8001/delete", - "tinyUrl": "http://mpagasas.di.uoa.gr:8001/tiny?url=", + "utilsService" : "http://mpagasas.di.uoa.gr:8000", "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",