update dependencies, migrate subscribe, add submit type to buttons

This commit is contained in:
2024-02-26 15:11:48 +01:00
parent 43da1441d9
commit 31dc5e5c25
31 changed files with 4388 additions and 5047 deletions
+9 -6
View File
@@ -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;
}
}
})
}