Make domain functions more generic
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@52605 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
622ed57a8f
commit
f648847e1a
|
@ -2,7 +2,7 @@ export class ConnectHelper{
|
|||
|
||||
public static getCommunityFromDomain(domain:string):string{
|
||||
// domain = "beta.egi.openaire.eu"; for testing
|
||||
if(domain.indexOf("di.uoa.gr")!=-1){
|
||||
if(domain.indexOf("openaire.eu") == -1){
|
||||
return null;
|
||||
}
|
||||
if(domain.indexOf("beta")!=-1){
|
||||
|
@ -17,11 +17,10 @@ export class ConnectHelper{
|
|||
return domain;
|
||||
}
|
||||
public static isProduction(domain:string):boolean{
|
||||
if(domain.indexOf(".di.uoa.gr")!=-1){
|
||||
if(domain.indexOf(".openaire.eu")==-1){
|
||||
return false;
|
||||
}else if(domain.indexOf(".openaire.eu")!=-1){
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static getProductionPrefix(domain:string):string{
|
||||
if(domain.indexOf("beta.")!=-1){
|
||||
|
|
Loading…
Reference in New Issue