Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public update(idtoken: string, name: string, picture: string):any {
- var body = { idtoken : idtoken, type: 'update', name: name, picture: picture };
- return this.http.post(global.url + '/api/user', body, {}).map(result =>
- {
- console.log(result);
- });
- }
- dialogRef.afterClosed().subscribe(result => {
- if(!isNullOrUndefined(result)) {
- if (!isNullOrUndefined(result.name)) {
- this.name = result.name;
- }
- if (!isNullOrUndefined(result.image)) {
- this.profileImage = result.image;
- }
- this.userService.update(this.id_token,this.name, this.profileImage).subscribe(result => console.log(result));
- }
- });
Add Comment
Please, Sign In to add comment