minor edit

This commit is contained in:
Nikolaos Laskaris 2017-10-17 12:26:58 +03:00
parent a5c7be1f26
commit f9b995a7bc
2 changed files with 4 additions and 2 deletions

View File

@ -45,6 +45,7 @@ export class MainSignInComponent implements OnInit {
this.nativeLogin.login(this.creds.username, this.creds.password).subscribe(
response => {
simple_notifier("success",null,"Successful login");
this.tokenService.setLoggedIn(true);

View File

@ -22,12 +22,13 @@ export class RestBase {
restpath: string = "rest";
loginPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/";
loginPath : string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/login/";
restBasePath: string = this.protocol+"://"+this.hostname+":"+this.port+"/"+this.webappname+"/"+this.restpath+"/";
public login(path : string, data : any){
return this.http.post<any>(this.loginPath + path, JSON.stringify(data));
let options = { headers: new HttpHeaders().set('Content-Type', 'application/json') };
return this.http.post<any>(this.loginPath + path, JSON.stringify(data), options);
}
public get(path : string){