diff --git a/dmp-frontend/src/app/dmps/dmp.component.ts b/dmp-frontend/src/app/dmps/dmp.component.ts index 0f794032e..75b466e34 100644 --- a/dmp-frontend/src/app/dmps/dmp.component.ts +++ b/dmp-frontend/src/app/dmps/dmp.component.ts @@ -133,7 +133,7 @@ myFunction() { SaveNewDmp(){ console.log(this.dmp, this.dmp.projectsDropDownKey); //this.http.post('http://someurl', JSON.stringify(this.project)) - this.serverService.createDmpForProject(this.dmp, this.dmp.projectsDropDownKey) + this.serverService.createDmpForProject(this.dmp) .subscribe( response =>{ console.log("response"); diff --git a/dmp-frontend/src/app/dmps/dmps.html b/dmp-frontend/src/app/dmps/dmps.html index 93da07a85..b8afa45cb 100644 --- a/dmp-frontend/src/app/dmps/dmps.html +++ b/dmp-frontend/src/app/dmps/dmps.html @@ -64,7 +64,7 @@
-
diff --git a/dmp-frontend/src/app/services/rest-base.ts b/dmp-frontend/src/app/services/rest-base.ts index 9d9618591..13b2e02ba 100644 --- a/dmp-frontend/src/app/services/rest-base.ts +++ b/dmp-frontend/src/app/services/rest-base.ts @@ -15,16 +15,16 @@ export class RestBase { this.xml2jsonOBJ = new X2JS(); } - // protocol: string = "http"; - // hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";// - // port: number = 8080;//8080;// - // webappname: string = "dmp-backend-1";//"dmp-backend-new";// - protocol: string = "http"; - hostname: string ="dionysus.di.uoa.gr" ; - port: number = 7070; + hostname: string ="dl010.madgik.di.uoa.gr" ;//"localhost";//"dl010.madgik.di.uoa.gr";// + port: number = 8080;//8080;// webappname: string = "dmp-backend";//"dmp-backend-new";// + // protocol: string = "http"; + // hostname: string ="dionysus.di.uoa.gr" ; + // port: number = 7070; + // webappname: string = "dmp-backend";//"dmp-backend-new";// + proxyPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/proxy/"; loginPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/login/"; diff --git a/dmp-frontend/src/app/services/server.service.ts b/dmp-frontend/src/app/services/server.service.ts index 11ba7a601..ea9a3f94a 100644 --- a/dmp-frontend/src/app/services/server.service.ts +++ b/dmp-frontend/src/app/services/server.service.ts @@ -104,13 +104,17 @@ export class ServerService { return this.restBase.get("dmp/getofuser"); } - public createDmpForProject(data:any, projectid: string){ + public createDmpForProject2(data:any, projectid: string){ //return this.restBase.post("dmp/createforproject", data); - return this.restBase.postWithParams('dmp/createforproject', data, - new HttpParams().set('projectid', projectid) + return this.restBase.postWithParams('dmp/create', data, + new HttpParams().set('id', projectid) ) } + public createDmpForProject(data:any){ + return this.restBase.post("dmp/create", data); + } + logOut() {