aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/post/post.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/components/post/post.component.ts')
-rw-r--r--src/app/components/post/post.component.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts
index 387f56f..a46811d 100644
--- a/src/app/components/post/post.component.ts
+++ b/src/app/components/post/post.component.ts
@@ -26,8 +26,8 @@ export class PostComponent implements OnInit {
this.post = this._postService.getDefaultPost();
this.user = this._userService.getDefaultUser();
- this._postService.getPostRequest(Guid.parse(this.paramId)).subscribe(
- (result: object) => {
+ this._postService.getPostRequest(Guid.parse(this.paramId)).subscribe({
+ next: (result: object) => {
Object.assign(this.post, result);
this.post.fileURLs = Object.values(result)[7];
this.votesNumber = 23;
@@ -35,16 +35,16 @@ export class PostComponent implements OnInit {
this.timeCreated = new Date(this.post.timeCreated).toLocaleString('en-GB');
this.loadUser();
}
- );
+ });
}
private loadUser(): void {
- this._userService.getUserByUsernameRequest(this.post.creatorUsername).subscribe(
- (result: object) => {
+ this._userService.getUserByUsernameRequest(this.post.creatorUsername).subscribe({
+ next: (result: object) => {
Object.assign(this.user, result);
this.loaded = true;
}
- );
+ });
}
goToAuthorProfile(): void {