diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-25 14:38:12 +0200 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-02-25 14:38:12 +0200 |
| commit | eab7b2108d91af1c905f795febf811d5cc404863 (patch) | |
| tree | 968c641667d60532c0dbc97bd13d3284f3bbcdc6 /src/app/components/comment-page | |
| parent | a7bf5cad6bf66f2cd7e12fc436410fafb7826b10 (diff) | |
| download | DevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.tar DevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.tar.gz DevHive-Angular-eab7b2108d91af1c905f795febf811d5cc404863.zip | |
Removed unnecessary variables from request subscriptions
Diffstat (limited to 'src/app/components/comment-page')
| -rw-r--r-- | src/app/components/comment-page/comment-page.component.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/app/components/comment-page/comment-page.component.ts b/src/app/components/comment-page/comment-page.component.ts index 045e8ea..413436e 100644 --- a/src/app/components/comment-page/comment-page.component.ts +++ b/src/app/components/comment-page/comment-page.component.ts @@ -1,4 +1,3 @@ -import { HttpErrorResponse } from '@angular/common/http'; import { Component, OnInit } from '@angular/core'; import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { Title } from '@angular/platform-browser'; @@ -42,7 +41,7 @@ export class CommentPageComponent implements OnInit { } this.loaded = true; }, - (err: HttpErrorResponse) => { + () => { this._router.navigate(['/not-found']); } ); @@ -68,7 +67,7 @@ export class CommentPageComponent implements OnInit { if (newMessage !== '' && newMessage !== this.comment.message) { console.log(this.commentId); this._commentService.putCommentWithSessionStorageRequest(this.commentId, this.comment.postId, newMessage).subscribe( - (result: object) => { + () => { this.reloadPage(); } ); @@ -79,7 +78,7 @@ export class CommentPageComponent implements OnInit { deleteComment(): void { this._commentService.deleteCommentWithSessionStorage(this.commentId).subscribe( - (result: object) => { + () => { this.toPost(); } ); |
