upgrade to newest backend
This commit is contained in:
@@ -2,6 +2,7 @@ import {Component, OnInit} from '@angular/core';
|
||||
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
|
||||
import {AuthService} from '../../services/auth.service';
|
||||
import {ProfileService} from '../../services/profile.service';
|
||||
|
||||
@Component({
|
||||
@@ -14,8 +15,10 @@ export class UserComponent implements OnInit {
|
||||
model: any;
|
||||
error = false;
|
||||
success = false;
|
||||
isMe = false;
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
private profileService: ProfileService,
|
||||
private route: ActivatedRoute) {}
|
||||
|
||||
@@ -27,6 +30,12 @@ export class UserComponent implements OnInit {
|
||||
}, error => {
|
||||
this.error = error;
|
||||
})
|
||||
|
||||
this.authService.auth.subscribe((auth: any) => {
|
||||
this.isMe = auth && auth.principal && auth.principal.username == this.username;
|
||||
console.log(this.isMe, auth);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user