aboutsummaryrefslogtreecommitdiff
path: root/src/app/components/comment/comment.component.ts
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/comment/comment.component.ts
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/comment/comment.component.ts')
-rw-r--r--src/app/components/comment/comment.component.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/app/components/comment/comment.component.ts b/src/app/components/comment/comment.component.ts
index 5076769..7da896d 100644
--- a/src/app/components/comment/comment.component.ts
+++ b/src/app/components/comment/comment.component.ts
@@ -3,8 +3,8 @@ import { Router } from '@angular/router';
import { Guid } from 'guid-typescript';
import { CommentService } from 'src/app/services/comment.service';
import { UserService } from 'src/app/services/user.service';
-import { Comment } from 'src/models/comment';
-import { User } from 'src/models/identity/user';
+import { Comment } from 'src/models/comment.model';
+import { User } from 'src/models/identity/user.model';
@Component({
selector: 'app-comment',
@@ -25,23 +25,23 @@ export class CommentComponent implements OnInit {
this.comment = this._commentService.getDefaultComment();
this.user = this._userService.getDefaultUser();
- this._commentService.getCommentRequest(Guid.parse(this.paramId)).subscribe(
- (result: object) => {
+ this._commentService.getCommentRequest(Guid.parse(this.paramId)).subscribe({
+ next: (result: object) => {
Object.assign(this.comment, result);
this.timeCreated = new Date(this.comment.timeCreated).toLocaleString('en-GB');
this.loadUser();
}
- );
+ });
}
private loadUser(): void {
- this._userService.getUserByUsernameRequest(this.comment.issuerUsername).subscribe(
- (result: object) => {
+ this._userService.getUserByUsernameRequest(this.comment.issuerUsername).subscribe({
+ next: (result: object) => {
Object.assign(this.user, result);
this.loaded = true;
}
- );
+ });
}
goToAuthorProfile(): void {