update dependencies, migrate subscribe, add submit type to buttons
This commit is contained in:
@@ -8,7 +8,7 @@ import { UserService } from '../../services/user.service';
|
||||
@Component({
|
||||
selector: 'page-user',
|
||||
templateUrl: './user.page.html',
|
||||
styleUrls: [ './user.page.scss' ]
|
||||
styleUrls: ['./user.page.scss']
|
||||
})
|
||||
export class PageUser implements OnInit {
|
||||
|
||||
@@ -21,11 +21,14 @@ export class PageUser implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.username = this.route.snapshot.paramMap.get('username');
|
||||
this.userService.getUser(this.username).subscribe((data) => {
|
||||
this.user = data;
|
||||
}, (error) => {
|
||||
if (error.status == 422) {
|
||||
this.notfound = true;
|
||||
this.userService.getUser(this.username).subscribe({
|
||||
next: (data) => {
|
||||
this.user = data;
|
||||
},
|
||||
error: (error) => {
|
||||
if (error.status == 422) {
|
||||
this.notfound = true;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user