aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/post
diff options
context:
space:
mode:
authorDanail Dimitrov <danaildimitrov321@gmail.com>2021-03-14 21:47:33 +0200
committerDanail Dimitrov <danaildimitrov321@gmail.com>2021-03-14 21:47:33 +0200
commite4fc300d2fe82084c67c50258c76b60248850863 (patch)
tree2b836291af4bc6801d7d809c828eb3e7d58a027a /src/app/components/post
parentafe30ab78432d16c42b2f19e3bd8355e3f27a0e1 (diff)
parent988c09b9233fd356b056b62593494772a2061993 (diff)
downloadDevHive-Angular-e4fc300d2fe82084c67c50258c76b60248850863.tar
DevHive-Angular-e4fc300d2fe82084c67c50258c76b60248850863.tar.gz
DevHive-Angular-e4fc300d2fe82084c67c50258c76b60248850863.zip
Merge branch 'dev' of https://github.com/Team-Kaleidoscope/DevHive-Angular into rating_system
Diffstat (limited to 'src/app/components/post')
-rw-r--r--src/app/components/post/post.component.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/app/components/post/post.component.ts b/src/app/components/post/post.component.ts
index a38d507..4bb41a7 100644
--- a/src/app/components/post/post.component.ts
+++ b/src/app/components/post/post.component.ts
@@ -32,9 +32,9 @@ 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) => {
- Object.assign(this.post, result);
+ 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 = this.post.currentRating;
@@ -45,19 +45,19 @@ export class PostComponent implements OnInit {
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.highlightButtonsOnInit();
this.loaded = true;
}
- );
+ });
}
goToAuthorProfile(): void {