[Library|Trunk]

Domain:
	properties -->  domain: change it to https:// + domain (needed fro jsonld)
	getCommunityFromDomain function: split to remove the https://


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59248 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2020-08-11 12:39:55 +00:00
parent 07783fa92e
commit 99198fb0d9
3 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,8 @@ import {HttpParams} from '@angular/common/http';
export class ConnectHelper {
public static getCommunityFromDomain(domain: string): string{
//domain = "beta.covid-19.openaire.eu"; //for testing
// domain = "https://mes.openaire.eu"; //for testing
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
if (domain.indexOf('openaire.eu') === -1) {
return null;
}

View File

@ -17,7 +17,9 @@ export class OpenAireJsonldConverterService {
organization["@type"] = "Organization";
organization["name"] = name;
organization["url"] = URL;
organization["logo"] = logoURL;
if(logoURL && logoURL.length > 0 ) {
organization["logo"] = logoURL;
}
if(description){
organization["description"] = description;
}

View File

@ -17,7 +17,7 @@ export class EnvironmentSpecificService {
private propertiesPath = "/assets/env-properties.json?v=2";
constructor(private http: HttpClient, @Optional() @Inject(REQUEST) private request: Request) {
properties.domain = this.getDomain();
properties.domain = "https://" + this.getDomain();
}
public loadEnvironment() {